BGP EVPN フィルタリングの設定

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

BGP EVPNフィルタリングについて

この機能では、アドレス ファミリ L2VPN EVPN の BGP NLRI の実装に起因する、ルート フィルタリングと属性処理の要件について説明します。

EVPN ルートは、NLRI 形式の通常の IPv4 および IPv6 ルートとは大きく異なります。これらには多くのフィールドが含まれ、EVPN に固有の属性を保持します。ルート マップを使用すると、これらの属性に基づいてルートをフィルタリングできます。EVPN アドレス ファミリに属するルートには、次のルート フィルタリング オプションを使用できます。

  • EVPN ルート タイプに基づく照合:EVPN では 6 種類の NLRI を使用できます。照合は、route-map match ステートメントで指定されたタイプに基づきます。

  • NLRI の MAC アドレスに基づく照合:このオプションは、NLRI に組み込まれた IP アドレスに基づく照合に似ています。EVPN タイプ 2 ルートには、IP アドレスとともに MAC アドレスが含まれています。このオプションは、このようなルートをフィルタリングするために使用できます。

  • RMAC 拡張コミュニティに基づく照合:EVPN タイプ 2 およびタイプ 5 ルートは、MAC アドレスを伝送するルータ MAC(RMAC)拡張コミュニティを伝送します。RMAC は、他の拡張コミュニティ情報とともにネイバーへの更新メッセージの一部としてアドバタイズされます。ルートのリモート ネクスト ホップの MAC アドレスを指定します。このオプションを使用すると、この RMAC 拡張コミュニティとの照合が可能になります。

  • RMAC 拡張コミュニティの設定:このオプションでは、EVPN NLRI の RMAC 拡張コミュニティ値を変更できます。

  • EVPN ネクスト ホップ IP アドレスの設定:このオプションは、一致条件が満たされると、EVPN ルートのネクスト ホップ IP アドレスを設定します。EVPN ルートのネクスト ホップ IP アドレスを設定するには、転送の正確性を確保するために RMAC 拡張コミュニティを設定する必要があります。

  • ルート タイプ 5 のゲートウェイ IP アドレスの設定:ゲートウェイ IP アドレスは、タイプ 5 EVPN ルートを形成する IP プレフィックスのオーバーレイ IP インデックスをエンコードします。更新メッセージで EVPN NLRI の一部としてアドバタイズされます。デフォルト値は 0.0.0.0 です。他の値に設定されている場合、VRF コンテキスト内のルートのネクストホップは、指定されたゲートウェイ IP アドレスに変更されます。

  • テーブル マップの使用:テーブル マップを設定して、レイヤ 2 ルーティング情報ベース(L2RIB)にダウンロードされた MAC ルートをフィルタリングできます。

この章の残りの部分では、これらのオプションの設定と適用について説明します。

BGP フィルタリングの注意事項と制限事項

BGP EVPN フィルタリングの注意事項と制約事項は次のとおりです。

Cisco Nexus 9000 シリーズスイッチは、BGP EVPN フィルタリングをサポートしています。

ルートの EVPN アドレス ファミリのフィルタリングには、次の match および set オプションを使用できます。

  • ルート タイプに基づく照合

  • NLRI の MAC アドレスに基づく照合

  • RMAC 拡張コミュニティに基づく照合

  • RMAC 拡張コミュニティの設定

  • EVPN ネクスト ホップ IP アドレスの設定:複数のネクスト ホップ IP アドレスが設定されている場合、最初のアドレスのみが使用され、EVPN に使用されます。IPv4 および IPv6 は、ネクストホップ アドレスとして使用できます。

  • ルート タイプ 5 のゲートウェイ IP アドレスの設定:route-map コマンドを使用して IPv4 ゲートウェイ IP アドレスを設定できます。

  • テーブル マップの使用:MAC ルートをフィルタリングするためのテーブル マップがレイヤ 2 ルーティング情報ベース(L2RIB)にダウンロードされます。

BGP EVPN フィルタリングの設定

EVPN アドレス ファミリ ルートのルート フィルタリングを実行するには、次のタスクを実行します。

テーブル マップ設定モードでは、次のタスクを実行できます。

match および set 句を使用したルート マップの設定

match および set 句とともに既存のルートマップ設定を使用して、必要なフィルタリングの種類を決定できます。

EVPN ルート タイプに基づく照合

手順の概要

  1. configure terminal
  2. route-map route-map-name
  3. match evpn route-type {1 | 2 | 2-mac-ip | 2-mac-only | 3 | 4 | 5 | 6}

手順の詳細

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

ステップ 1

configure terminal

例:
switch# configure terminal

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

ステップ 2

route-map route-map-name

例:
switch(config)# route-map ROUTE_MAP_1

ルート マップを作成します。

ステップ 3

match evpn route-type {1 | 2 | 2-mac-ip | 2-mac-only | 3 | 4 | 5 | 6}

例:
switch(config-route-map)# match evpn route-type 6

BGP EVPN ルートを照合します。

NLRI の MAC アドレスに基づく照合

手順の概要

  1. configure terminal
  2. mac-list list-name [seq seq-number] {deny | permit} mac-address [mac-mask]
  3. route-map route-map-name
  4. match mac-list mac-list-name

手順の詳細

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

ステップ 1

configure terminal

例:
switch# configure terminal

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

ステップ 2

mac-list list-name [seq seq-number] {deny | permit} mac-address [mac-mask]

例:
switch(config)# mac-list MAC_LIST_1 permit E:E:E

MAC リストを構築します。

ステップ 3

route-map route-map-name

例:
switch(config)# route-map ROUTE_MAP_1

ルート マップを作成します。

ステップ 4

match mac-list mac-list-name

例:
switch(config-route-map)# match mac-list MAC_LIST_1

MAC リストのエントリを照合します。最大で 63 文字です。

RMAC 拡張コミュニティに基づく照合

手順の概要

  1. configure terminal
  2. ip extcommunity-list standard list-name seq 5 {deny | permit} rmac mac-addr
  3. route-map route-map-name
  4. match extcommunity list-name

手順の詳細

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

ステップ 1

configure terminal

例:
switch# configure terminal

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

ステップ 2

ip extcommunity-list standard list-name seq 5 {deny | permit} rmac mac-addr

例:
switch(config)# ip extcommunity-list standard EXTCOMM_LIST_RMAC seq 5 permit rmac a8b4.56e4.7edf

extcommunity リスト エントリを追加します。list-name 引数は 63 文字を超えることはできません。

ステップ 3

route-map route-map-name

例:
switch(config)# route-map ROUTE_MAP_1

ルート マップを作成します。

ステップ 4

match extcommunity list-name

例:
switch(config-route-map)# match extcommunity EXTCOMM_LIST_RMAC

拡張コミュニティ リスト名と一致します。

RMAC 拡張コミュニティの設定

手順の概要

  1. configure terminal
  2. route-map route-map-name
  3. set extcommunity evpn rmac mac-address

手順の詳細

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

ステップ 1

configure terminal

例:
switch# configure terminal

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

ステップ 2

route-map route-map-name

例:
switch(config)# route-map ROUTE_MAP_1

ルート マップを作成します。

ステップ 3

set extcommunity evpn rmac mac-address

例:
switch(config-route-map)# set extcommunity evpn rmac EEEE.EEEE.EEEE

BGP RMAC extcommunity 属性を設定します。

EVPN ネクストホップ IP アドレスの設定

手順の概要

  1. configure terminal
  2. route-map route-map-name
  3. set ip next-hop next-hop
  4. set ipv6 next-hop next-hop

手順の詳細

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

ステップ 1

configure terminal

例:
switch# configure terminal

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

ステップ 2

route-map route-map-name

例:
switch(config)# route-map ROUTE_MAP_1

ルート マップを作成します。

ステップ 3

set ip next-hop next-hop

例:
switch(config-route-map)# set ip next-hop 209.165.200.226

EVPN IP ネクスト ホップの IP アドレスを設定します。

ステップ 4

set ipv6 next-hop next-hop

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

IPv6 ネクストホップ アドレスを設定します。

ルート タイプ 5 のゲートウェイ IP アドレスの設定

手順の概要

  1. configure terminal
  2. route-map route-map-name
  3. set evpn gateway-ip gw-ip-address

手順の詳細

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

ステップ 1

configure terminal

例:
switch# configure terminal

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

ステップ 2

route-map route-map-name

例:
switch(config)# route-map ROUTE_MAP_1

ルート マップを作成します。

ステップ 3

set evpn gateway-ip gw-ip-address

例:
switch(config-route-map)# set evpn gateway-ip 209.165.200.227

ゲートウェイの IP アドレスを設定します。

着信または発信レベルでのルート マップの適用

要件に基づいて match および set 句を使用してルートマップを設定したら、この手順を使用してインバウンドまたはアウトバウンド レベルでルートマップを適用します。

手順の概要

  1. configure terminal
  2. router bgp as-num
  3. neighbor address
  4. address-family l2vpn evpn
  5. route-map ルート マップ {in | out}

手順の詳細

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

ステップ 1

configure terminal

例:

switch# configure terminal

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

ステップ 2

router bgp as-num

例:

switch(config)# router bgp 100

ルーティング プロセスをイネーブルにします。as-num の範囲は 1 ~ 65535 です。

ステップ 3

neighbor address

例:

switch(config-router)# neighbor 1.1.1.1

BGP ネイバーを設定します。

ステップ 4

address-family l2vpn evpn

例:

switch(config-router-neighbor)# address-family l2vpn evpn

L2VPN アドレス ファミリを設定します。

ステップ 5

route-map ルート マップ {in | out}

例:

switch(config-router-neighbor-af)# route-map ROUTE_MAP_1 in

ルート マップをネイバーに適用します。

BGP EVPN フィルタリングの設定例

ここでは、EVPN ルートをフィルタリングするための設定例を示します。

例 1

次に、EVPN タイプ 2 ルートをフィルタリングし、RMAC 拡張コミュニティを 52fc.c310.2e80 として設定する例を示します。

  1. 次の出力は、ルート マップが適用される前の EVPN テーブル内のルートとタイプ 2 EVPN MAC ルートを示しています。

    leaf1(config)# show bgp l2vpn evpn
    BGP routing table information for VRF default, address family L2VPN EVPN
    BGP table version is 12, Local Router ID is 1.1.1.1
    Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
    Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
    Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2
    
    Network            Next Hop            Metric     LocPrf     Weight Path
    Route Distinguisher: 1.1.1.1:32868    (L2VNI 101)
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
    33.33.33.33                       100          0 i
    
    Route Distinguisher: 3.3.3.3:3
    *>i[2]:[0]:[0]:[48]:[52fc.d83a.1b08]:[0]:[0.0.0.0]/216
    33.33.33.33                       100          0 i
    *>i[5]:[0]:[0]:[24]:[101.0.0.0]/224
    3.3.3.3                  0        100          0 ?
    
    Route Distinguisher: 3.3.3.3:32868
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
    33.33.33.33                       100          0 i
    
    Route Distinguisher: 1.1.1.1:3    (L3VNI 100)
    *>i[2]:[0]:[0]:[48]:[52fc.d83a.1b08]:[0]:[0.0.0.0]/216
    33.33.33.33                       100          0 i
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
    33.33.33.33                       100          0 i
    *>l[5]:[0]:[0]:[24]:[10.0.0.0]/224
    1.1.1.1                  0        100      32768 ?
    *>l[5]:[0]:[0]:[24]:[100.0.0.0]/224
    1.1.1.1                  0        100      32768 ?
    *>i[5]:[0]:[0]:[24]:[101.0.0.0]/224
    3.3.3.3                  0        100          0 ?
    
    leaf1(config)# show bgp l2vpn evpn aaaa.aaaa.aaaa
    BGP routing table information for VRF default, address family L2VPN EVPN
    Route Distinguisher: 1.1.1.1:32868    (L2VNI 101)
    BGP routing table entry for [2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/2
    72, version 12
    Paths: (1 available, best #1)
    Flags: (0x000212) (high32 00000000) on xmit-list, is in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop, in rib
    Imported from 3.3.3.3:32868:[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:
    [101.0.0.3]/272 
    AS-Path: NONE, path sourced internal to AS
    33.33.33.33 (metric 81) from 101.101.101.101 (101.101.101.101)
    Origin IGP, MED not set, localpref 100, weight 0
    Received label 101 100
    Extcommunity: RT:100:100 RT:100:101 SOO:33.33.33.33:0 ENCAP:8
    Router MAC:52fc.d83a.1b08
    Originator: 3.3.3.3 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 3.3.3.3:32868
    BGP routing table entry for [2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/2
    72, version 8
    Paths: (1 available, best #1)
    Flags: (0x000202) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
    Imported to 3 destination(s)
    Imported paths list: vni100 default default
    AS-Path: NONE, path sourced internal to AS
    33.33.33.33 (metric 81) from 101.101.101.101 (101.101.101.101)
    Origin IGP, MED not set, localpref 100, weight 0
    Received label 101 100
    Extcommunity: RT:100:100 RT:100:101 SOO:33.33.33.33:0 ENCAP:8
    Router MAC:52fc.d83a.1b08
    Originator: 3.3.3.3 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 1.1.1.1:3    (L3VNI 100)
    BGP routing table entry for [2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/2
    72, version 11
    Paths: (1 available, best #1)
    Flags: (0x000202) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
    Imported from 3.3.3.3:32868:[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:
    [101.0.0.3]/272 
    AS-Path: NONE, path sourced internal to AS
    33.33.33.33 (metric 81) from 101.101.101.101 (101.101.101.101)
    Origin IGP, MED not set, localpref 100, weight 0
    Received label 101 100
    Extcommunity: RT:100:100 RT:100:101 SOO:33.33.33.33:0 ENCAP:8
    Router MAC:52fc.d83a.1b08
    Originator: 3.3.3.3 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    
  2. 次に、ルート マップの設定例を示します。

    leaf1(config)# show run rpm
    
    !Command: show running-config rpm
    !Running configuration last done at: Thu Sep  3 22:32:23 2020
    !Time: Thu Sep  3 22:32:31 2020
    
    version 9.3(5) Bios:version
    route-map FILTER_EVPN_TYPE2 permit 10
        match evpn route-type 2 
        set extcommunity evpn rmac 52fc.c310.2e80
    route-map allow permit 10
    
    
  3. 次に、ルート マップをインバウンド ルート マップとして EVPN ピアに適用する例を示します。

    leaf1(config-router-neighbor-af)# show run bgp
    
    !Command: show running-config bgp
    !Running configuration last done at: Mon Aug  3 18:08:24 2020
    !Time: Mon Aug  3 18:08:28 2020
    
    version 9.3(5) Bios:version  
    feature bgp
    
    router bgp 100
      event-history detail size large
      neighbor 101.101.101.101
        remote-as 100
        update-source loopback0
        address-family l2vpn evpn
          send-community extended
          route-map FILTER_EVPN_TYPE2 in
      vrf vni100
        address-family ipv4 unicast
          advertise l2vpn evpn
          redistribute direct route-map allow
    
    
  4. 次の出力は、ルート マップが適用された後の EVPN テーブルのルートとタイプ 2 EVPN MAC ルートを示しています。

    leaf1(config)# show bgp l2vpn evpn
    BGP routing table information for VRF default, address family L2VPN EVPN
    BGP table version is 19, Local Router ID is 1.1.1.1
    Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
    Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
    Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2
    
    Network            Next Hop            Metric     LocPrf     Weight Path
    Route Distinguisher: 1.1.1.1:32868    (L2VNI 101)
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
                          33.33.33.33                       100          0 i
    
    Route Distinguisher: 3.3.3.3:3
    *>i[2]:[0]:[0]:[48]:[52fc.d83a.1b08]:[0]:[0.0.0.0]/216
                          33.33.33.33                       100          0 i
    
    Route Distinguisher: 3.3.3.3:32868
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
                          33.33.33.33                       100          0 i
    
    Route Distinguisher: 1.1.1.1:3    (L3VNI 100)
    *>i[2]:[0]:[0]:[48]:[52fc.d83a.1b08]:[0]:[0.0.0.0]/216
                          33.33.33.33                       100          0 i
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
                          33.33.33.33                       100          0 i
    *>l[5]:[0]:[0]:[24]:[10.0.0.0]/224
                          1.1.1.1                  0        100      32768 ?
    *>l[5]:[0]:[0]:[24]:[100.0.0.0]/224
                          1.1.1.1                  0        100      32768 ?
    
    leaf1(config)# show bgp l2vpn evpn aaaa.aaaa.aaaa
    BGP routing table information for VRF default, address family L2VPN EVPN
    Route Distinguisher: 1.1.1.1:32868    (L2VNI 101)
    BGP routing table entry for [2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/2
    72, version 19
    Paths: (1 available, best #1)
    Flags: (0x000212) (high32 00000000) on xmit-list, is in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop, in rib
    Imported from 3.3.3.3:32868:[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:
    [101.0.0.3]/272 
    AS-Path: NONE, path sourced internal to AS
    33.33.33.33 (metric 81) from 101.101.101.101 (101.101.101.101)
    Origin IGP, MED not set, localpref 100, weight 0
    Received label 101 100
    Extcommunity: RT:100:100 RT:100:101 SOO:33.33.33.33:0 ENCAP:8
    Router MAC:52fc.c310.2e80
    Originator: 3.3.3.3 Cluster list: 101.101.101.101 
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 3.3.3.3:32868
    BGP routing table entry for [2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/2
    72, version 15
    Paths: (1 available, best #1)
    Flags: (0x000202) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
    Imported to 3 destination(s)
    Imported paths list: vni100 default default
    AS-Path: NONE, path sourced internal to AS
    33.33.33.33 (metric 81) from 101.101.101.101 (101.101.101.101)
    Origin IGP, MED not set, localpref 100, weight 0
    Received label 101 100
    Extcommunity: RT:100:100 RT:100:101 SOO:33.33.33.33:0 ENCAP:8
    Router MAC:52fc.c310.2e80
    Originator: 3.3.3.3 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 1.1.1.1:3    (L3VNI 100)
    BGP routing table entry for [2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/2
    72, version 18
    Paths: (1 available, best #1)
    Flags: (0x000202) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
    Imported from 3.3.3.3:32868:[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:
    [101.0.0.3]/272 
    AS-Path: NONE, path sourced internal to AS
    33.33.33.33 (metric 81) from 101.101.101.101 (101.101.101.101)
    Origin IGP, MED not set, localpref 100, weight 0
    Received label 101 100
    Extcommunity: RT:100:100 RT:100:101 SOO:33.33.33.33:0 ENCAP:8
    Router MAC:52fc.c310.2e80
    Originator: 3.3.3.3 Cluster list: 101.101.101.101
    
    Path-id 1 not advertised to any peer
    
    

同様に、他の EVPN 固有の match 句と set 句を既存のルート マップ オプションとともに使用して、必要に応じて EVPN ルートをフィルタリングできます。

例 2

次に、EVPN ルート フィルタリングを使用して、EVPN ルートが学習された VTEP とは異なる VTEP にトラフィックをリダイレクトする例を示します。これには、ネクスト ホップ IP アドレスと、他の VTEP に対応するルートの RMAC の設定が含まれます。

この例では、次のことを示します。

  • ホスト 1 は VRF evpn-tenant-0002とVLAN 3002 に属し、リーフ 1 とリーフ 2 に接続されます。

  • ホスト 1 への到達可能性は、リーフ 1 およびリーフ 2 によって BL1 にアドバタイズされます。

BL1では、11.11.11.11 / 32 への両方のルートが次のように受信されます。

  • リーフ 1 である 1.1.1.1 から 1 つ

  • リーフ2 である 2.2.2.2 から 1 つ

  1. 最初に、11.11.11.11 に到達するためのベスト パスは 1.1.1.1 です。

    bl1(config)# show bgp l2 e 11.11.11.11
    BGP routing table information for VRF default, address family L2VPN EVPN
    Route Distinguisher: 1.1.1.1:3
    BGP routing table entry for [5]:[0]:[0]:[32]:[11.11.11.11]/224, version 15
    Paths: (1 available, best #1)
    Flags: (0x000002) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
        Imported to 2 destination(s)
        Imported paths list: evpn-tenant-0002 default
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS
      1.1.1.1 (metric 81) from 101.101.101.101 (101.101.101.101)
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003002
        Extcommunity: RT:1:3003002 ENCAP:8 Router MAC:5254.0074.caf5
        Originator: 1.1.1.1 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 2.2.2.2:4
    BGP routing table entry for [5]:[0]:[0]:[32]:[11.11.11.11]/224, version 79
    Paths: (1 available, best #1)
    Flags: (0x000002) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
        Imported to 2 destination(s)
        Imported paths list: evpn-tenant-0002 default
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS
      2.2.2.2 (metric 81) from 101.101.101.101 (101.101.101.101)
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003002
        Extcommunity: RT:1:3003002 ENCAP:8 Router MAC:5254.0090.433e
        Originator: 2.2.2.2 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 3.3.3.3:3    (L3VNI 3003002)
    BGP routing table entry for [5]:[0]:[0]:[32]:[11.11.11.11]/224, version 80
    Paths: (2 available, best #2)Flags: (0x000002) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Path type: internal, path is valid, not best reason: Router Id, no labeled nexthop
        Imported from 2.2.2.2:4:[5]:[0]:[0]:[32]:[11.11.11.11]/224 
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS
      2.2.2.2 (metric 81) from 101.101.101.101 (101.101.101.101)    
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003002
        Extcommunity: RT:1:3003002 ENCAP:8 Router MAC:5254.0090.433e
        Originator: 2.2.2.2 Cluster list: 101.101.101.101 
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
        Imported from 1.1.1.1:3:[5]:[0]:[0]:[32]:[11.11.11.11]/224
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS
      1.1.1.1 (metric 81) from 101.101.101.101 (101.101.101.101)
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003002
        Extcommunity: RT:1:3003002 ENCAP:8 Router MAC:5254.0074.caf5
        Originator: 1.1.1.1 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 3.3.3.3:4    (L3VNI 3003003)
    BGP routing table entry for [5]:[0]:[0]:[32]:[11.11.11.11]/224, version 24
    Paths: (1 available, best #1)
    Flags: (0x000002) (high32 00000000) on xmit-list, is not in l2rib/evpn
    
    Advertised path-id 1
    Path type: local, path is valid, is best path, no labeled nexthop
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS
      3.3.3.3 (metric 0) from 0.0.0.0 (3.3.3.3)
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003003
        Extcommunity: RT:1:3003003 ENCAP:8 Router MAC:5254.006a.435b
        Originator: 1.1.1.1 Cluster list: 101.101.101.101 
    
    Path-id 1 advertised to peers:
    101.101.101.101
    
    bl1(config)# show ip route 11.11.11.11
    IP Route Table for VRF "default"
    '*' denotes best ucast next-hop
    '**' denotes best mcast next-hop
    '[x/y]' denotes [preference/metric]
    '%<string>' in via output denotes VRF <string>
    
    11.11.11.11/32, ubest/mbest: 1/0
    *via 1.1.1.1, [200/0], 00:02:51, bgp-1, internal, tag 150 (evpn) segid: 3003
    002 tunnelid: 0x1010101 encap: VXLAN
    
    
  2. トラフィックを他の VTEP リーフ 2 にリダイレクトするには、ルートマップ設定を使用して 11.11.11.11/32 ルートのネクスト ホップと RMAC を設定します。

    bl1(config-route-map)# show run rpm
    
    Command: show running-config rpm
    !Running configuration last done at: Wed Mar 27 00:12:14 2019
    !Time: Wed Mar 27 00:12:17 2019
    
    version 9.2(3) Bios:version
    ip prefix-list PFX_LIST1_1 seq 5 permit 11.11.11.11/32
    route-map TEST_SET_IP_NEXTHOP permit 10
        match ip address prefix-list PFX_LIST1_1
        set ip next-hop 2.2.2.2
        set extcommunity evpn rmac 5254.0090.433e
    
    
  3. BL1 のインバウンド レベルでルート マップを適用すると、ルート 11.11.11.11/32 のルート出力は次のようになります。

    bl1(config-router-neighbor-af)# show bgp l2 e 11.11.11.11
    BGP routing table information for VRF default, address family L2VPN EVPN
    Route Distinguisher: 1.1.1.1:3
    BGP routing table entry for [5]:[0]:[0]:[32]:[11.11.11.11]/224, version 81
    Paths: (1 available, best #1)
    Flags: (0x000002) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
        Imported to 2 destination(s)
        Imported paths list: evpn-tenant-0002 default
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS
      2.2.2.2 (metric 81) from 101.101.101.101 (101.101.101.101)
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003002
        Extcommunity: RT:1:3003002 ENCAP:8 Router MAC:5254.0090.433e
        Originator: 1.1.1.1 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 2.2.2.2:4
    BGP routing table entry for [5]:[0]:[0]:[32]:[11.11.11.11]/224, version 79
    Paths: (1 available, best #1)
    Flags: (0x000002) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
        Imported to 2 destination(s)
        Imported paths list: evpn-tenant-0002 default
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS  
      2.2.2.2 (metric 81) from 101.101.101.101 (101.101.101.101)
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003002
        Extcommunity: RT:1:3003002 ENCAP:8 Router MAC:5254.0090.433e
        Originator: 2.2.2.2 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 3.3.3.3:3    (L3VNI 3003002)
    BGP routing table entry for [5]:[0]:[0]:[32]:[11.11.11.11]/224, version 82
    Paths: (2 available, best #2)
    Flags: (0x000002) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
    
    Path type: internal, path is valid, not best reason: Router Id, no labeled nexthop
        Imported from 2.2.2.2:4:[5]:[0]:[0]:[32]:[11.11.11.11]/224
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS
      2.2.2.2 (metric 81) from 101.101.101.101 (101.101.101.101)
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003002
        Extcommunity: RT:1:3003002 ENCAP:8 Router MAC:5254.0090.433e
        Originator: 2.2.2.2 Cluster list: 101.101.101.101 
    
    Advertised path-id 1
    Path type: internal, path is valid, is best path, no labeled nexthop
        Imported from 1.1.1.1:3:[5]:[0]:[0]:[32]:[11.11.11.11]/224
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS
      2.2.2.2 (metric 81) from 101.101.101.101 (101.101.101.101)
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003002
        Extcommunity: RT:1:3003002 ENCAP:8 Router MAC:5254.0090.433e
        Originator: 1.1.1.1 Cluster list: 101.101.101.101 
    
    Path-id 1 not advertised to any peer
    
    Route Distinguisher: 3.3.3.3:4    (L3VNI 3003003)
    BGP routing table entry for [5]:[0]:[0]:[32]:[11.11.11.11]/224, version 24
    Paths: (1 available, best #1)
    Flags: (0x000002) (high32 00000000) on xmit-list, is not in l2rib/evpn
    
    Advertised path-id 1
    Path type: local, path is valid, is best path, no labeled nexthop
    Gateway IP: 0.0.0.0
    AS-Path: 150 , path sourced external to AS
      3.3.3.3 (metric 0) from 0.0.0.0 (3.3.3.3)
        Origin incomplete, MED 0, localpref 100, weight 0
        Received label 3003003
        Extcommunity: RT:1:3003003 ENCAP:8 Router MAC:5254.006a.435b
        Originator: 1.1.1.1 Cluster list: 101.101.101.101 
    
    Path-id 1 advertised to peers:
    101.101.101.101
    
    
    bl1(config-router-neighbor-af)# show ip route 11.11.11.11
    IP Route Table for VRF "default"
    '*' denotes best ucast next-hop
    '**' denotes best mcast next-hop
    '[x/y]' denotes [preference/metric]
    '%<string>' in via output denotes VRF <string>
    
    11.11.11.11/32, ubest/mbest: 1/0
    *via 2.2.2.2, [200/0], 00:02:37, bgp-1, internal, tag 150 (evpn) segid: 3003
    002 tunnelid: 0x2020202 encap: VXLAN
    
    

ルート マップを使用してネクスト ホップと RMAC 値が設定されると、以前に 1.1.1.1 を介して転送されたトラフィックは、2.2.2.2 を介して転送されます。

テーブル マップの設定

テーブル マップを設定および適用するには、次のタスクを実行します。

MAC リストおよび MAC リストと一致するルート マップの設定

手順の概要

  1. configure terminal
  2. mac-list list-name [seq seq-number] {deny | permit} mac-address [mac-mask]
  3. route-map route-map-name
  4. match mac-list mac-list-name

手順の詳細

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

ステップ 1

configure terminal

例:
switch# configure terminal

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

ステップ 2

mac-list list-name [seq seq-number] {deny | permit} mac-address [mac-mask]

例:
switch(config)# mac-list MAC_LIST_1 permit E:E:E

MAC リストを構築します。

ステップ 3

route-map route-map-name

例:
switch(config)# route-map ROUTE_MAP_1

ルート マップを作成します。

ステップ 4

match mac-list mac-list-name

例:
switch(config-route-map)# match mac-list MAC_LIST_1

MAC リストのエントリを照合します。最大で 63 文字です。

テーブル マップの適用

手順の概要

  1. configure terminal
  2. evpn
  3. vni vni-id l2
  4. table-map route-map-name [filter]

手順の詳細

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

ステップ 1

configure terminal

例:
switch# configure terminal

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

ステップ 2

evpn

例:
switch(config)# evpn

EVPN 設定モードを開始します。

ステップ 3

vni vni-id l2

例:
switch(config-evpn)# vni 101 l2

イーサネット VPN ID を設定します。vni-range の範囲は 1 ~ 16,777,214 です。

ステップ 4

table-map route-map-name [filter]

例:
switch(config-evpn-evi)# table-map ROUTE_MAP_1 filter

EVPN VNI 設定レベルでテーブル マップを適用します。filter オプションが指定されている場合、ルートマップ検証によって拒否されたルートは L2RIB にダウンロードされません。

テーブル マップの設定例

次のテーブル マップの設定例は、MACルートaaaa.aaaa.aaaa が L2RIB にダウンロードされないようにフィルタリングする方法を示しています。

  1. 次の例は、ルートマップが適用される前の、EVPN テーブルのルートと L2RIB の MAC ルートの出力を示しています。

    leaf1(config)# show bgp l2vpn evpn
    BGP routing table information for VRF default, address family L2VPN EVPN
    BGP table version is 25, Local Router ID is 1.1.1.1
    Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
    Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
    Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2
    
    Network            Next Hop            Metric     LocPrf     Weight Path
    Route Distinguisher: 1.1.1.1:32868    (L2VNI 101)
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
    33.33.33.33                       100          0 i
    
    Route Distinguisher: 3.3.3.3:3
    *>i[2]:[0]:[0]:[48]:[52fc.d83a.1b08]:[0]:[0.0.0.0]/216
    33.33.33.33                       100          0 i
    
    Route Distinguisher: 3.3.3.3:32868
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
    33.33.33.33                       100          0 i
    
    Route Distinguisher: 1.1.1.1:3    (L3VNI 100)
    *>i[2]:[0]:[0]:[48]:[52fc.d83a.1b08]:[0]:[0.0.0.0]/216
    33.33.33.33                       100          0 i
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
    33.33.33.33                       100          0 i
    *>l[5]:[0]:[0]:[24]:[10.0.0.0]/224
    1.1.1.1                  0        100      32768 ?
    *>l[5]:[0]:[0]:[24]:[100.0.0.0]/224
    1.1.1.1                  0        100      32768 ?
    
    leaf1(config)# show l2route evpn mac all
    
    Flags -(Rmac):Router MAC (Stt):Static (L):Local (R):Remote (V):vPC link
    (Dup):Duplicate (Spl):Split (Rcv):Recv (AD):Auto-Delete (D):Del Pending
    (S):Stale (C):Clear, (Ps):Peer Sync (O):Re-Originated (Nho):NH-Override
    (Pf):Permanently-Frozen, (Orp): Orphan
    
    Topology  Mac Address     Prod  Flags  Seq No  Next-Hops
    --------- -----------     ----  -----  ------- ----------
    100       52fc.d83a.1b08  VXLAN  Rmac  0       33.33.33.33
    101       aaaa.aaaa.aaaa  BGP    Spl   0       33.33.33.33 (Label: 101)
    
    leaf1(config-evpn-evi)# show mac address-table vlan 101
    Legend: * - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC
    age - seconds since last seen,+ - primary entry using vPC Peer-Link,
    (T) - True, (F) - False, C - ControlPlane MAC, ~ - vsanVLAN     MAC Address
    Type      age     Secure NTFY Ports
    ---------+-----------------+--------+---------+------+----+------------------
    C  101     aaaa.aaaa.aaaa   dynamic  0         F      F    nve1(33.33.33.33)
    G  101     521d.7cef.1b08   static   -         F      F    sup-eth1(R)
    
    
  2. 次に、MAC ルートをフィルタするようにルート マップを設定する例を示します。

    leaf1(config)# show run rpm
    
    !Command: show running-config rpm
    !Running configuration last done at: Thu Sep  3 21:47:48 2020
    !Time: Thu Sep  3 22:27:57 2020
    
    version 9.4(1) Bios:version
    mac-list FILTER_MAC_AAA seq 5 deny aaaa.aaaa.aaaa ffff.ffff.ffff
    route-map TABLE_MAP_FILTER permit 10
      match mac-list FILTER_MAC_AAA
    
    
  3. 次に、BGP EVPN レベルでルート マップを適用する例を示します。

    leaf1(config-evpn-evi)# show run bgp | section evpn
    evpn
        vni 101 l2
          table-map TABLE_MAP_FILTER filter
          rd auto
          route-target import auto
          route-target export auto
          route-target both auto evpn
    
    
  4. 次の例は、テーブルマップが設定された後のEVPNテーブルのルートとL2RIBのMACルートの出力を示しています。

    leaf1(config-evpn-evi)# show bgp l2vpn evpn
    BGP routing table information for VRF default, address family L2VPN EVPN
    BGP table version is 26, Local Router ID is 1.1.1.1
    Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
    Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
    Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup, 2 - best2
    Network            Next Hop            Metric     LocPrf     Weight Path
    Route Distinguisher: 1.1.1.1:32868    (L2VNI 101)
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
    33.33.33.33                       100          0 i
    
    Route Distinguisher: 3.3.3.3:3
    *>i[2]:[0]:[0]:[48]:[52fc.d83a.1b08]:[0]:[0.0.0.0]/216
    33.33.33.33                       100          0 i
    
    Route Distinguisher: 3.3.3.3:32868
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
    33.33.33.33                       100          0 i
    
    Route Distinguisher: 1.1.1.1:3    (L3VNI 100)
    *>i[2]:[0]:[0]:[48]:[52fc.d83a.1b08]:[0]:[0.0.0.0]/216
    33.33.33.33                       100          0 i
    *>i[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/272
    33.33.33.33                       100          0 i
    *>l[5]:[0]:[0]:[24]:[10.0.0.0]/224
    1.1.1.1                  0        100      32768 ?
    *>l[5]:[0]:[0]:[24]:[100.0.0.0]/224
    1.1.1.1                  0        100      32768 ?
    
    leaf1(config-evpn-evi)# show l2route evpn mac all
    
    Flags -(Rmac):Router MAC (Stt):Static (L):Local (R):Remote (V):vPC link
    (Dup):Duplicate (Spl):Split (Rcv):Recv (AD):Auto-Delete (D):Del Pending
    (S):Stale (C):Clear, (Ps):Peer Sync (O):Re-Originated (Nho):NH-Override
    (Pf):Permanently-Frozen, (Orp): Orphan
    
    Topology    Mac Address    Prod   Flags  Seq No  Next-Hops
    ----------- -------------- ------ ------ ------- ------------
    100         52fc.d83a.1b08 VXLAN  Rmac   0       33.33.33.33
    
    leaf1(config-evpn-evi)# show mac address-table vlan 101
    Legend: 
    * - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC
    age - seconds since last seen,+ - primary entry using vPC Peer-Link,
    (T) - True, (F) - False, C - ControlPlane MAC, ~ - vsan
    VLAN     MAC Address      Type      age     Secure NTFY Ports
    ---------+-----------------+--------+---------+------+----+------------------
    G  101     521d.7cef.1b08   static   -         F      F    sup-eth1(R)
    
    

BGP EVPN フィルタリングの確認

BGP EVPN フィルタリング設定のステータスを表示するには、次のコマンドを入力します。

表 1. BGP EVPN フィルタリングの表示

コマンド

目的

show mac-list

MAC リストを表示します。

show route-map name

ルート マップの情報を表示します。

show running-config bgp

BGP の設定を表示します。

show running-config rpm

すべてのルート ポリシー マネージャー(RPM)情報を表示します。

show bgp l2vpn evpn

BRIB のルートを表示します。

show mac-list コマンドの例:

switch(config)# show mac-list
mac-list list1: 5 entries
   seq 5 deny 0000.836d.f8b7 ffff.ffff.ffff
   seq 6 deny 0000.836d.f8b5 ffff.ffff.ffff
   seq 7 permit 0000.0422.6811 ffff.ffff.ffff
   seq 8 deny 0000.836d.f8b1 ffff.ffff.ffff
   seq 10 permit 0000.0000.0000 0000.0000.0000
mac-list list2: 3 entries
   seq 5 deny 0000.836e.f8b6 ffff.ffff.ffff
   seq 8 deny 0000.0421.6818 ffff.ffff.ffff
   seq 10 permit 0000.0000.0000 0000.0000.0000
mac-list list3: 2 entries
   seq 5 deny 0000.836d.f8b6 ffff.ffff.ffff
   seq 10 permit 0000.836d.f8b7 ffff.ffff.ffff

show route-map コマンドの例:

switch# show route-map pol10
route-map pol10, permit, sequence 10
  Match clauses:
    mac-list: list2
  Set clauses:
    ip next-hop 6.6.6.1 3.3.3.10
    ipv6 next-hop 303:304::1

show running-config bgp コマンドの例:

switch# show running-config bgp | beg "5000"
vni 5000 l2
table-map pol1 filter
rd auto
route-target import auto
route-target export auto
vni 5001 l2
rd auto
route-target import auto
route-target export auto

show running-config rpm コマンドの例:

switch# show running-config rpm
!Running configuration last done at: Thu May 23 13:58:31 2019
!Time: Thu May 23 13:58:47 2019

version 9.3(1) Bios:version 07.65
feature pbr

mac-list list1 seq 5 permit 0001.0001.0001 ffff.ffff.ffff
mac-list mclist seq 5 permit 0001.0001.0001 ffff.ffff.ffff
route-map test permit 10
match evpn route-type 5
set evpn gateway-ip 1.1.1.2

EVPN ルート aaaa.aaaa.aaaa に関する詳細情報を表示する show bgp l2vpn evpn aaaa.aaaa.aaaa コマンドの例

switch(config-evpn-evi)# show bgp l2 e aaaa.aaaa.aaaa

BGP routing table information for VRF default, address family L2VPN EVPN
Route Distinguisher: 1.1.1.1:32868 (L2VNI 101)
BGP routing table entry for [2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:[101.0.0.3]/2
72, version 11
Paths: (1 available, best #1)
Flags: (0x000202) (high32 00000000) on xmit-list, is not in l2rib/evpn, table-ma
p filtered, is not in HW
 
Advertised path-id 1
Path type: internal, path is valid, is best path, remote nh not installed, no 
labeled nexthop
Imported from 3.3.3.3:32868:[2]:[0]:[0]:[48]:[aaaa.aaaa.aaaa]:[32]:
[101.0.0.3]/272 
AS-Path: NONE, path sourced internal to AS
33.33.33.33 (metric 81) from 101.101.101.101 (101.101.101.101)
Origin IGP, MED not set, localpref 100, weight 0
Received label 101 100
Extcommunity: RT:100:100 RT:100:101 SOO:33.33.33.33:0 ENCAP:8
Router MAC:5254.009b.4275
Originator: 3.3.3.3 Cluster list: 101.101.101.101 
 
Path-id 1 not advertised to any peer