GRE を介した MPLS レイヤ 3 VPN の設定

GRE を介した MPLS レイヤ 3 VPN の前提条件

  • マルチプロトコル ラベル スイッチング(MPLS)バーチャル プライベート ネットワーク(VPN)が設定されていることを確認します。

  • 次のルーティングプロトコルが設定されていることを確認します。

    • Label Distribution Protocol(LDP; ラベル配布プロトコル):MPLS ラベル配布の場合。

    • マルチプロトコル ボーダー ゲートウェイ プロトコル(MP-BGP):VPN ルートとラベル配布の場合。

  • プロトコル境界を横断する QoS ポリシーを定義するには、Quality of Service(QoS)グループ値を使用することを推奨します。入力トラフィックは MPLS ネットワークから IP コアに入り、出力トラフィックは IP コアを出て MPLS ネットワークに入るため、QoS グループ値が必要です。

  • Generic Routing Encapsulation(GRE)トンネルを設定する前に、IP アドレスを指定してループバック インターフェイス(Virtual Routing Forwarding(VRF)に接続されていない)インターフェイスを設定します。IPv4 アドレスを持つこのダミー ループバック インターフェイスは、IPv4 転送用に内部で作成されたトンネルインターフェイスを有効にします。VRF に接続されておらず IPv4 アドレスが設定されているインターフェイスがシステムに 1 つ以上ある場合は、ループバック インターフェイスを設定する必要はありません。

GRE を介した MPLS レイヤ 3 VPN の制約事項

GRE を介した MPLS レイヤ 3 VPN 機能では、次のものはサポートされません。

  • トンネルインターフェイスに設定されている QoS サービスポリシー


    (注)  


    トンネルインターフェイスに設定されている QoS サービスポリシーはサポートされませんが、物理インターフェイスまたはサブインターフェイスに設定されている QoS サービスポリシーはサポートされます。


  • シーケンシング、チェックサム、およびソースルートなどの GRE オプション

  • IPv6 GRE の設定

  • Carrier Supporting Carrier(CSC)などの拡張機能

GRE を介した MPLS レイヤ 3 VPN に関する情報

GRE を介した MPLS レイヤ 3 VPN 機能は、非 MPLS ネットワーク経由で MPLS パケットのトンネリングを行うためのメカニズムを提供します。この機能を使用すると、非 MPLS ネットワーク間の GRE トンネルを作成できます。MPLS パケットは、GRE トンネル パケット内でカプセル化され、カプセル化されたパケットは、GRE トンネルを経由して非 MPLS ネットワークを通ります。GRE トンネル パケットを非 MPLS ネットワークの反対側で受信すると、GRE トンネル パケット ヘッダーが削除され、内部の MPLS パケットが最終的な宛先に転送されます。

トンネリング設定のタイプ

次の項では、サポートされているさまざまなタイプのトンネリング設定について説明します。

PE-to-PE トンネリング

プロバイダー エッジ間(PE-to-PE)トンネリング設定によって、非 MPLS ネットワーク間の複数のカスタマー ネットワークをスケーラブルな方法で接続できます。この設定を使用して、複数のカスタマー ネットワーク宛のトラフィックは、単一の GRE トンネルから多重化されます。

PE-to-PE トンネリング に示すように、PE デバイスは、VRF 番号を非 MPLS ネットワークの各側にあるカスタマーエッジ(CE)デバイスに割り当てます。

PE デバイスは、ボーダー ゲートウェイ プロトコル(BGP)、Open Shortest Path First(OSPF)、または Routing Information Protocol(RIP)などのルーティング プロトコルを、CE デバイスの背後にある IP ネットワークを学習するために使用します。CE デバイスの背後にある IP ネットワークへのルートは、関連する CE デバイスの VRF ルーティング テーブルに格納されます。

非 MPLS ネットワークの一方の側にある PE デバイスは(非 MPLS ネットワーク内で動作している)ルーティングプロトコルを使用して、非 MPLS ネットワークのもう一方の側にある PE デバイスについて学習します。PE デバイス間に確立された学習ルートは、メインまたはデフォルトのルーティング テーブルに格納されます。

反対方向の PE デバイスは、BGP を使用して、PE デバイスの背後にあるカスタマー ネットワークに関連付けられたルートについて学習します。これらの学習ルートは、非 MPLS ネットワークには認識されません。

PE-to-PE トンネリングは、非 MPLS ネットワークにまたがる GRE トンネル経由で BGP ネイバー(反対方向の PE デバイス)へのスタティック ルートを定義する BGP を示しています。BGP ネイバーによって学習されたルートには GRE トンネルのネクストホップが含まれているため、すべてのカスタマー ネットワーク トラフィックが GRE トンネルを使用して送信されます。

図 1. PE-to-PE トンネリング

P-to-PE トンネリング

P-to-PE トンネリング に、非 MPLS ネットワーク上で 2 つの MPLS セグメント(P2 から PE2)を接続する方法を示します。この設定では、非 MPLS ネットワークの一方の側宛の MPLS トラフィックは、単一の GRE トンネル経由で送信されます。

図 2. P-to-PE トンネリング

P-to-P トンネリング

P-to-P トンネリング に、非 MPLS ネットワーク上で 2 つの MPLS セグメント(P1 〜 P2)を接続する方法を示します。この設定では、非 MPLS ネットワークの一方の側宛の MPLS トラフィックは、単一の GRE トンネル経由で送信されます。

図 3. P-to-P トンネリング

GRE を介した MPLS レイヤ 3 VPN の設定方法

GRE を介した MPLS 機能を設定するには、非 MPLS ネットワークにまたがる GRE トンネルを作成する必要があります。GRE トンネルの両端にあるデバイスで、次の手順を実行します。

手順

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

ステップ 1

enable

例:

Device> enable

特権 EXEC モードを有効にします。

プロンプトが表示されたらパスワードを入力します。

ステップ 2

configure terminal

例:

Device# configure terminal

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

ステップ 3

interface tunnel tunnel-number

例:

Device(config)# interface tunnel 1

トンネル インターフェイスを作成します。続いて、インターフェイス コンフィギュレーション モードを開始します。

ステップ 4

ip address ip-address mask

例:

Device(config-if)# ip address 10.0.0.1 255.255.255.0

トンネル インターフェイスに IP アドレスを割り当てます。

ステップ 5

tunnel source source-address

例:

Device(config-if)# tunnel source 10.1.1.1

トンネルの送信元 IP アドレスを設定します。

ステップ 6

tunnel destination destination-address

例:

Device(config-if)# tunnel destination 10.1.1.2

トンネルの宛先 IP アドレスを設定します。

ステップ 7

mpls ip

例:

Device(config-if)# mpls ip

トンネルの物理インターフェイスでの MPLS を有効にします。

ステップ 8

end

例:

Device(config-if)# end

特権 EXEC モードに戻ります。

GRE を介した MPLS レイヤ 3 VPN の設定例

次の項では、GRE を介した MPLS レイヤ 3 VPN のさまざまな設定例を示します。

例:GRE を介した MPLS レイヤ 3 VPN(PE-to-PE トンネリング)の設定

次に、PE1 から PE2 へのレイヤ 3 VPN および GRE トンネルを設定する例を示します(PE-to-PE トンネリング を参照)。

次に、PE1 にループバック インターフェイスを設定する例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Loopback10
Device(config-if)# ip address 209.165.200.225 255.255.255.255
Device(config-if)# end

次に、PE2 にループバック インターフェイスを設定する例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Loopback3
Device(config-if)# ip address 209.165.202.129 255.255.255.255
Device(config-if)# end

次に、PE1 の IGP でループバックをアドバタイズする例を示します。

Device> enable
Device# configure terminal
Device(config)# router ospf 10
Device(config-router)# router-id 198.51.100.10
Device(config-router)# end

次に、GRE トンネルを設定し、トンネルで異なる IGP インスタンスを設定し、PE1 のトンネルで MPLS を有効にする例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Tunnel13
Device(config-if)# ip address 203.0.113.200 255.255.255.248
Device(config-if)# ip ospf 11 area 0
Device(config-if)# mpls ip
Device(config-if)# tunnel source 209.165.200.225
Device(config-if)# tunnel destination 209.165.202.129
Device(config-if)# end

次に、GRE トンネルを設定し、トンネルで異なる IGP インスタンスを設定し、PE2 のトンネルで MPLS を有効にする例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Tunnel31
Device(config-if)# ip address 203.0.113.201 255.255.255.248
Device(config-if)# ip ospf 11 area 0
Device(config-if)# mpls ip
Device(config-if)# tunnel source 209.165.202.129
Device(config-if)# tunnel destination 209.165.200.225
Device(config-if)# end

次に、トンネルに設定された IGP インスタンスで BGP の PE1 ループバック IP をアドバタイズする例を示します。

Device> enable
Device# configure terminal
Device(config)# router ospf 11
Device(config-router)# router-id 198.51.100.11
Device(config-router)# network 192.0.1.1 0.0.0.0 area 0
Device(config-router)# end

次に、トンネルに設定された IGP インスタンスで BGP の PE2 ループバック IP をアドバタイズする例を示します。

Device> enable
Device# configure terminal
Device(config)# router ospf 11
Device(config-router)# router-id 203.0.113.201
Device(config-router)# network 192.0.1.1 0.0.0.0 area 0
Device(config-router)# end

次に、CE1 が接続されている PE1 に VRF を設定する例を示します。

Device> enable
Device# configure terminal
Device(config)# vrf definition vrf-1
Device (config-vrf)# rd 1:1
Device (config-vrf)# address-family ipv4
Device (config-vrf-af)# route-target import 1:2
Device (config-vrf-af)# route-target export 1:1
Device(config-vrf)# end

次に、CE2 が接続されている PE2 に VRF を設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# vrf definition vrf-1
Device (config-vrf)# rd 2:2
Device (config-vrf)# address-family ipv4
Device (config-vrf-af)# route-target import 1:1
Device (config-vrf-af)# route-target export 1:2
Device(config-vrf)# end

次に、PE1-CE1 インターフェイスを設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# int po14.1
Device (config-subif)# encapsulation dot1Q 10
Device (config-subif)# vrf forwarding vrf-1
Device (config-subif)# ip address 14.2.1.1 255.255.255.0
Device(config-subif)# end

次に、PE2-CE2 インターフェイスを設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# int po24.1
Device (config-subif)# encapsulation dot1Q 10
Device (config-subif)# vrf forwarding vrf-1
Device (config-subif)# ip address 24.2.1.1 255.255.255.0
Device(config-subif)# end

次に、PE1-CE1 外部ボーダー ゲートウェイ プロトコル(EBGP)を設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# router bgp 65040
Device (config-router)# address-family ipv4 vrf vrf-1
Device (config-router-af)# neighbor 14.2.1.2 remote-as 65041
Device (config-router-af)# neighbor 14.2.1.2 activate
Device (config-router-af)# exit-address-family
Device(config-router)# end

次に、PE2-CE2 EBGP を設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# router bgp 65040
Device (config-router)# address-family ipv4 vrf vrf-1
Device (config-router-af)# neighbor 24.2.1.2 remote-as 65041
Device (config-router-af)# neighbor 24.2.1.2 activate
Device (config-router-af)# exit-address-family
Device (config-router)# end

次に、PE1 に PE1-PE2 MP-BGP を設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# router bgp 65040
Device (config-router)# neighbor 192.0.2.1 remote-as 65040
Device (config-router)# neighbor 192.0.2.1 update-source Loopback0
Device (config-router)# address-family ipv4
Device (config-router-af)# neighbor 192.0.2.1 activate
Device (config-router-af)# exit
Device (config-router)# address-family vpnv4
Device (config-router-af)#  neighbor 192.0.2.1 activate
Device (config-router-af)#  neighbor 192.0.2.1 send-community both
Device (config-router-af)# exit
Device (config-router)# end

例:GRE を介した MPLS レイヤ 3 VPN(P-to-PE トンネリング)の設定

次に、PE デバイス(PE1 と PE2)および MPLS セグメント(P1)でレイヤ 3 VPN を設定し、PE1 から P1、PE2 への GRE トンネルを設定する例を示します(P-to-PE トンネリング を参照)。

次に、PE1 の GRE トンネルにループバック インターフェイスを設定する例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Loopback4
Device(config-if)# ip address 209.165.200.230 255.255.255.255
Device(config-if)# end

次に、P1 の GRE トンネルにループバック インターフェイスを設定する例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Loopback100
Device(config-if)# ip address 209.165.200.235 255.255.255.255
Device(config-if)# end

次に、PE1-P1 からインターフェイスを設定し、IGP を設定する例を示します。

Device> enable
Device# configure terminal 
Device(config)# interface Port-channel11
Device(config-if)# no switchport
Device(config-if)# ip address 209.165.201.1 255.255.255.248
Device(config-if)# ip ospf 10 area 0
Device(config-if)# end

次に、P1-PE1 からインターフェイスを設定し、IGP を設定する例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Port-channel1
Device(config-if)# no switchport
Device(config-if)# ip address 209.165.201.2 255.255.255.248
Device(config-if)# ip broadcast-address 209.165.201.31
Device(config-if)# ip ospf 10 area 0
Device(config-if)# end

次に、PE1 の IGP でループバックをアドバタイズする例を示します。

Device> enable
Device# configure terminal
Device(config)# router ospf 10
Device(config-router)# router-id 198.51.100.10
Device(config-router)# network 209.165.200.230 0.0.0.0 area 0
Device(config-router)# end

次に、P1 の IGP でループバックをアドバタイズする例を示します。

Device> enable
Device# configure terminal
Device(config)# router ospf 10
Device(config-router)# router-id 198.51.100.20
Device(config-router)# network 209.165.200.235 0.0.0.0 area 0
Device(config-router)# end

次に、GRE トンネルを設定し、トンネルで IGP インスタンスを設定し、PE1 のトンネルで MPLS を有効にする例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Tunnel111
Device(config-if)# ip address 209.165.202.140 255.255.255.248
Device(config-if)# ip ospf 11 area 0
Device(config-if)# mpls ip
Device(config-if)# tunnel source 209.165.200.230
Device(config-if)# tunnel destination 209.165.200.235
Device(config-if)# end

次に、GRE トンネルを設定し、トンネルで IGP インスタンスを設定し、P1 のトンネルで MPLS を有効にする例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Tunnel111
Device(config-if)# ip address 209.165.202.141 255.255.255.248
Device(config-if)# ip ospf 11 area 0
Device(config-if)# mpls ip
Device(config-if)# tunnel source 209.165.200.235
Device(config-if)# tunnel destination 209.165.200.230
Device(config-if)# end

次に、PE1 上のトンネルの IGP インスタンスで BGP の PE ループバック IP をアドバタイズする例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Tunnel111
Device(config)# router ospf 11
Device(config-router)# router-id 198.51.100.11
Device(config-router)# network 192.0.1.1 0.0.0.0 area 0
Device(config-router)# end

次に、PE2-P1 からインターフェイスを設定し、IGP および MPLS を設定する例を示します。

Device> enable
Device# configure terminal 
Device(config)# interface Port-channel12
Device(config-if)# no switchport
Device(config-if)# ip address 209.165.201.1 255.255.255.248
Device(config-if)# ip ospf 11 area 0
Device(config-if)# mpls ip
Device(config-if)# end

次に、P1-PE2 からインターフェイスを設定し、IGP を設定する例を示します。

Device> enable
Device# configure terminal
Device(config)# interface Port-channel12
Device(config-if)# no switchport
Device(config-if)# ip address 209.165.201.2 255.255.255.248
Device(config-if)# ip ospf 11 area 0
Device(config-if)# mpls ip
Device(config-if)# end

次に、CE1 が接続されている PE1 で VRF を作成する例を示します。

Device> enable
Device# configure terminal
Device(config)# vrf definition vrf-1
Device (config-vrf)# rd 1:1
Device (config-vrf)# address-family ipv4
Device (config-vrf-af)# route-target import 1:2
Device (config-vrf-af)# route-target export 1:1
Device (config-vrf-af)# exit
Device (config-vrf)# end

次に、CE2 が接続されている PE2 で VRF を作成する例を示します。

Device> enable
Device# configure terminal
Device (config)# vrf definition vrf-1
Device (config-vrf)# rd 2:2
Device (config-vrf)# address-family ipv4
Device (config-vrf-af)# route-target import 1:1
Device (config-vrf-af)# route-target export 1:2
Device (config-vrf-af)# exit
Device (config-vrf)# end

次に、PE1-CE1 インターフェイスを設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# int po14.1
Device (config-subif)# encapsulation dot1Q 10
Device (config-subif)# vrf forwarding vrf-1
Device (config-subif)# ip address 14.2.1.1 255.255.255.0
Device (config-subif)# exit
Device (config)# end

次に、PE2-CE2 インターフェイスを設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# int po24.1 
Device (config-subif)# encapsulation dot1Q 10
Device (config-subif)# vrf forwarding vrf-1
Device (config-subif)# ip address 24.2.1.1 255.255.255.0
Device (config-subif)# exit
Device (config)# end

次に、PE1-CE1 EBGP を設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# router bgp 65040
Device (config-router)# address-family ipv4 vrf vrf-1
Device (config-router-af)# neighbor 14.2.1.2 remote-as 65041
Device (config-router-af)# neighbor 14.2.1.2 activate
Device (config-router-af)# exit-address-family
Device (config-router)# end

次に、PE2-CE2 EBGP を設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# router bgp 65040
Device (config-router)# address-family ipv4 vrf vrf-1
Device (config-router-af)# neighbor 24.2.1.2 remote-as 65041
Device (config-router-af)# neighbor 24.2.1.2 activate
Device (config-router-af)# exit-address-family
Device (config-router)# end

次に、PE1 に PE1-PE2 MP-BGP を設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# router bgp 65040
Device (config-router)# neighbor 192.0.2.1 remote-as 65040
Device (config-router)# neighbor 192.0.2.1 update-source Loopback0
Device (config-router)# address-family ipv4
Device (config-router-af)# neighbor 192.0.2.1 activate
Device (config-router-af)# exit
Device (config-router)# address-family vpnv4
Device (config-router-af)# neighbor 192.0.2.1 activate
Device (config-router-af)# neighbor 192.0.2.1 send-community both
Device (config-router-af)# exit
Device (config-router)# end

次に、PE2 に PE2-PE1 MP-BGP を設定する例を示します。

Device> enable
Device# configure terminal
Device (config)# router bgp 65040
Device (config-router)# neighbor 192.0.1.1 remote-as 65040
Device (config-router)# neighbor 192.0.1.1 update-source Loopback0
Device (config-router)# address-family ipv4
Device (config-router-af)# neighbor 192.0.1.1 activate
Device (config-router-af)# exit
Device (config-router)# address-family vpnv4
Device (config-router-af)# neighbor 192.0.1.1 activate
Device (config-router-af)# neighbor 192.0.1.1 send-community both
Device (config-router-af)# exit
Device (config-router)# end

GRE を介した MPLS レイヤ 3 VPN の設定に関する機能履歴

次の表に、このモジュールで説明する機能のリリースおよび関連情報を示します。

これらの機能は、特に明記されていない限り、導入されたリリース以降のすべてのリリースで使用できます。

リリース

機能

機能情報

Cisco IOS XE Gibraltar 16.12.1

GRE を介した MPLS レイヤ 3 VPN

GRE を介した MPLS レイヤ 3 VPN 機能は、非 MPLS ネットワーク経由で MPLS パケットのトンネリングを行うためのメカニズムを提供します。

Cisco Feature Navigator を使用すると、プラットフォームおよびソフトウェアイメージのサポート情報を検索できます。Cisco Feature Navigator にアクセスするには、https://cfnng.cisco.com/にアクセスします。

http://www.cisco.com/go/cfn