cRPDでのMPLSサポート
cRPDでのMPLSサポートについて
マルチプロトコルラベルスイッチング(MPLS)設定は、MPLSネットワーク内の宛先にパケットを転送するためにcRPDでサポートされています。
MPLS では、最初のデバイスのみがルーティング ルックアップを行います。デバイスは、ネクストホップを見つける代わりに、その宛先へのパスとともに最終的な宛先を見つけます。MPLS パケットのパスは、LSP(ラベルスイッチ パス)と呼ばれます。LSPは、ネットワークまたは自律システム(AS)を通る単方向ルートです。AS内のMPLSルーターは、MPLSトラフィックエンジニアリング情報の交換を通じて、ネットワークを介したパスを決定します。これらのパスを使用して、ルーターは確立されたルートに沿ってトラフィックをネットワークに誘導します。各ルーターは、IPルーティングのようにパスに沿ったネクストホップを選択するのではなく、パケットを所定のネクストホップアドレスに転送します。
LSPの一部であるルーターは、LSR(ラベルスイッチングルーター)です。MPLS LSP は、静的 LSP を使用して確立されます。静的LSPでは、パスに沿った各ルーターを明示的に設定する必要があります。パスとそれに関連付けられたラベル値を手動で設定する必要があります。
cRPD は、限られた数の Junos OS MPLS 機能のみをサポートします。階層下の cRPD CLI で MPLS interface
、 ipv6-tunneling
、 label-history
、 label-range
、および static-label-switched-path
を edit protocols mpls
設定できます。
Supported Features
BGP 設定
PRPD API を使用した MPLS
BGP ラベル付きユニキャスト設定
「」も参照
例:cRPDでのMPLSの静的ラベルスイッチパスの設定
この例では、BGPとMPLSの静的ラベルスイッチパスを設定することで、VPNトラフィックがPE間のv4 MPLSトンネルを通過する方法を示しています。
要件
この例では、以下のハードウェアとソフトウェアのコンポーネントを使用しています。
Ubuntu ソフトウェア バージョン 18.04
Linux カーネル バージョン 4.5 以降
cRPD ソフトウェア リリース バージョン 19.4R1 以降
MPLS 転送用に静的 LSP を設定する前に、基本コンポーネントをインストールする必要があります。
cRPDインスタンスが作成されたホストOS上のMPLSモジュール。詳細については、 ホストOSでの設定の構成を参照してください。
PE1(プロバイダ エッジ ルーター)、P(プロバイダ ルーター)、PE2(プロバイダ エッジ ルーター)インストールについては、 DockerへのcRPDのインストールを参照してください。
概要
この例では、PE1 は MPLS ネットワークへのラベル エッジ ルーターまたはイングレス ノードとして機能し、ラベルを添付してパケットをカプセル化します。P は、MPLS ネットワークのラベルを使用して MPLS パケットを転送するラベル スイッチング ルーターとして機能します。
MPLS を設定するには、イングレス ルーターとトランジット ルーターに 1 つ以上の名前付きパスを作成する必要があります。パスごとに、パス内の一部またはすべてのトランジットルーターを指定できます。
MPLS の静的ラベルスイッチ パス(LSP)の設定は、個々のルーターでの静的ルートの設定と同様です。
構成
cRPDでMPLSの静的LSPを設定するには:
PE1ルーターの設定
手順
静的LSPを設定するには:
inet.0 と mpls.0 のテーブルを作成します。
[edit routing-options] user@crpd1# set rib inet.0 user@crpd1# set rib mpls.0 user@crpd1# set router-id 20.2.2.2
BGP セッションを設定します。
[edit protocols bgp group VPN] user@crpd1# set type internal local-address 20.2.2.2 family inet-vpn unicast user@crpd1# set local-as 5 user@crpd1# set neighbor 40.4.4.4 family inet-vpn unicast
静的ラベル範囲とイングレス静的LSPパラメーターを設定します。
[edit protocols mpls] user@crpd1# set interface all user@crpd1# set label-range static-label-range 1000000 1048575 user@crpd1# set static-label-switched-path pe2 ingress install 40.4.4.4/32 active user@crpd1# set static-label-switched-path pe2 ingress to 40.4.4.4 next-hop 20.20.20.2 push 1000001
イングレスPE2からの静的ルートを設定します。
[edit routing-options static] user@crpd1# set route 20.2.2.2/32 next-hop 20.20.20.2 user@crpd1# set route 40.4.4.4/32 static-lsp-next-hop pe2
PE1とその他のルーティングインスタンスパラメータでVRFルーティングインスタンスを設定します。
[edit routing-instances vrfblue] user@crpd1# set routing-options static route 10.1.1.1/32 next-hop 10.10.10.1 user@crpd1# set route-distinguisher 100:100 user@crpd1# set vrf-target target:100:100 user@crpd1# set interface all
結果
設定モードから、PE1 で および run show configuration protocols mpls
コマンドをshow protocols bgp
入力して設定を確認します。出力に意図した設定が表示されない場合は、この例の設定手順を繰り返して修正します。
user@crpd1# show protocols bgp group VPN { type internal; local-address 20.2.2.2; family inet-vpn { unicast; } local-as 5; neighbor 40.4.4.4 { family inet-vpn { unicast; } } }
user@crpd1# run show configuration protocols mpls interface all; static-label-switched-path pe2 { ingress { next-hop 20.20.20.3; to 40.4.4.4; push 1000001; } }
デバイスの設定が完了したら、設定モードからコミットを入力します。
プロバイダPルーターの設定。
手順
静的LSPを設定するには:
ルーターPのルーターIDを設定します。
[edit routing-options] user@crpd2# set rib mpls.0 user@crpd2# set router-id 30.3.3.3
スワップラベルとポップラベル用にトランジットスタティックLSPを設定します。
[edit protocols mpls] user@crpd2# set label-range static-label-range 1000000 1048575 user@crpd2# set static-label-switched-path pe2 transit 1000001 next-hop 30.30.30.4 swap 1000002 user@crpd2# set static-label-switched-path pe1 transit 1000003 next-hop 20.20.20.2 swap 1000004 user@crpd2# set static-label-switched-path pe2 transit 1000001 pop next-hop 30.30.30.4 user@crpd2# set static-label-switched-path pe1 transit 1000003 pop next-hop 20.20.20.2
結果
設定モードから、P に 、 、 run show configuration protocols mpls
および run show mpls interface
コマンドをshow protocols bgp
入力して、設定を確認します。出力に意図した設定が表示されない場合は、この例の設定手順を繰り返して修正します。
user@crpd2# run show configuration protocols mpls interface all; static-label-switched-path pe1 { transit 1000003 { next-hop 20.20.20.2; swap 1000004; } } static-label-switched-path pe2 { transit 1000001 { next-hop 30.30.30.4; swap 1000002; } }
デバイスの設定が完了したら、設定モードからコミットを入力します。
PE2ルーターの設定
手順
PE2でMPLSの静的LSPを設定するには:
BGP セッションを設定します。
[edit protocols bgp group VPN ] user@crpd3# set type internal local-address 40.4.4.4 family inet-vpn unicast user@crpd3# set local-as 5 user@crpd3# set neighbor 20.2.2.2 family inet-vpn unicast
イングレス静的LSPパラメーターを設定します。
[edit protocols mpls ] user@crpd3# set interface all user@crpd3# set label-range static-label-range 1000000 1048575 user@crpd3# set static-label-switched-path pe1 ingress install 20.2.2.2/32 active user@crpd3# set static-label-switched-path pe1 ingress to 20.2.2.2 next-hop 30.30.30.4 push 1000003
イングレスPE1からのルーターIDと静的ルートを設定します。
[edit routing-options] user@crpd3# set rib inet.0 user@crpd3# set router-id 40.4.4.4 user@crpd3# set static route 40.4.4.4/32 next-hop 30.30.30.4 user@crpd3# set static route 20.2.2.2/32 static-lsp-next-hop pe1
PE2とその他のルーティングインスタンスパラメータでVRFルーティングインスタンスを設定します。
[edit routing-instances vrfblue] user@crpd3# set routing-options static route 50.5.5.5/32 next-hop 40.40.40.5 user@crpd3# set route-distinguisher 100:100 user@crpd3# set vrf-target target:100:100 user@crpd3# set interface all
結果
設定モードから、PE2 の および run show mpls interface
コマンドをrun show configuration protocols mpls
入力して設定を確認します。出力に意図した設定が表示されない場合は、この例の設定手順を繰り返して修正します。
user@crpd3# show protocols bgp group VPN { type internal; local-address 40.4.4.4; family inet-vpn { unicast; } local-as 5; neighbor 20.2.2.2 { family inet-vpn { unicast; } } }
user@crpd3# run show configuration protocols mpls interface all; static-label-switched-path pe2 { ingress { next-hop 20.20.20.3; to 40.4.4.4; push 1000001; } }
デバイスの設定が完了したら、設定モードからコミットを入力します。
検証
PE1 での MPLS 転送の検証
目的
PE1 上の MPLS の設定を検証します。
アクション
動作モードから、 コマンドを show route table vrfblue.inet.0 50.5.5.5
入力します。
user@crpd1> show route table vrfblue.inet.0 50.5.5.5
vrfblue.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 50.5.5.5/32 *[BGP/170] 00:01:03, localpref 100, from 40.4.4.4 AS path: I, validation-state: unverified > to 20.20.20.3 via pe1-p, Push 299776, Push 1000001(top)
動作モードから、 コマンドを show mpls label usage
入力します。
user@crpd1> show mpls label usage
Label space Total Available Applications LSI 999984 999983 (100.00%) BGP/LDP VPLS with no-tunnel-services, BGP L3VPN with vrf-table-label Block 999984 999983 (100.00%) BGP/LDP VPLS with tunnel-services, BGP L2VPN Dynamic 999984 999983 (100.00%) RSVP, LDP, PW, L3VPN, RSVP-P2MP, LDP-P2MP, MVPN, EVPN, BGP Static 48576 48576 (100.00%) Static LSP, Static PW Effective Ranges Range name Shared with Start End Dynamic 16 999999 Static 1000000 1048575 Configured Ranges Range name Shared with Start End Dynamic 16 999999 Static 1000000 1048575
動作モードから、 コマンドを show mpls static-lsp
入力します。
user@crpd1> show mpls static-lsp
Ingress LSPs: LSPname To State pe2 40.4.4.4 Up Total 1, displayed 1, Up 1, Down 0 Transit LSPs: Total 0, displayed 0, Up 0, Down 0 Bypass LSPs: Total 0, displayed 0, Up 0, Down 0 Segment LSPs: Total 0, displayed 0, Up 0, Down 0
動作モードから、 コマンドを show route table inet.3
入力します。
user@crpd1> show route table inet.3
inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 40.4.4.4/32 *[MPLS/6/1] 00:04:44, metric 0 > to 20.20.20.3 via pe1-p, Push 1000001
動作モードから、 コマンドを show route table mpls.0
入力します。
user@crpd1> show route table mpls.0
mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 00:15:45, metric 1 Receive 1 *[MPLS/0] 00:15:45, metric 1 Receive 2 *[MPLS/0] 00:15:45, metric 1 Receive 13 *[MPLS/0] 00:15:45, metric 1 Receive 299776 *[VPN/170] 00:06:32 > to 10.10.10.1 via pe1-ce1, Pop 299776(S=0) *[VPN/170] 00:06:32 > to 10.10.10.1 via pe1-ce1, Pop
動作モードから、 コマンドを ip route list table 5 50.5.5.5
入力します。
user@crpd1> ip route list table 5 50.5.5.5
50.5.5.5 encap mpls 1000001/299776 via 20.20.20.3 dev pe1-p proto 22
動作モードから、 コマンドを ip -f mpls route
入力します。
user@crpd1> ip -f mpls route
299776 via inet 10.10.10.1 dev pe1-ce1 proto 22
P で MPLS 転送を検証する
目的
P 上の MPLS の設定を検証するには。
アクション
シェル モードから、 コマンドを show route table mpls.0
入力します。
user@crpd2> show route table mpls.0
mpls.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 00:00:11, metric 1 Receive 1 *[MPLS/0] 00:00:11, metric 1 Receive 2 *[MPLS/0] 00:00:11, metric 1 Receive 13 *[MPLS/0] 00:00:11, metric 1 Receive 299776 *[VPN/170] 00:00:05 > to 20.20.20.2 via p-pe1, Pop 299776(S=0) *[VPN/170] 00:00:05 > to 20.20.20.2 via p-pe1, Pop 299792 *[VPN/170] 00:00:05 > to 30.30.30.4 via p-pe2, Pop 299792(S=0) *[VPN/170] 00:00:05 > to 30.30.30.4 via p-pe2, Pop 1000001 *[MPLS/6] 00:00:11, metric 1 > to 30.30.30.4 via p-pe2, Swap 1000002 1000003 *[MPLS/6] 00:00:11, metric 1 > to 20.20.20.2 via p-pe1, Swap 1000004
user@crpd2> show mpls static-lsp
Ingress LSPs: Total 0, displayed 0, Up 0, Down 0 Transit LSPs: LSPname Incoming-label State pe1 1000003 Up pe2 1000001 Up Total 2, displayed 2, Up 2, Down 0 Bypass LSPs: Total 0, displayed 0, Up 0, Down 0 Segment LSPs: Total 0, displayed 0, Up 0, Down 0
bashシェルモードから コマンドを ip -f mpls route
入力します。
user@crpd2:/# ip -f mpls route
299776 via inet 20.20.20.2 dev p-pe1 proto 22 299792 via inet 30.30.30.4 dev p-pe2 proto 22 1000001 as to 1000002 via inet 30.30.30.4 dev p-pe2 proto 22 1000003 as to 1000004 via inet 20.20.20.2 dev p-pe1 proto 22
PE2 での MPLS 転送の検証
目的
P 上の MPLS の設定を検証するには。
アクション
シェル モードから、 コマンドを show route table vrfblue.inet.0 10.1.1.1
入力します。
user@crpd3> show route table vrfblue.inet.0 10.1.1.1
vrfblue.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 10.1.1.1/32 *[BGP/170] 00:03:00, localpref 100, from 2.2.2.2 AS path: I, validation-state: unverified > to 30.30.30.3 via pe2-p, Push 299776, Push 1000003(top)
user@crpd3> show mpls static-lsp
Ingress LSPs: LSPname To State pe1 20.2.2.2 Up Total 1, displayed 1, Up 1, Down 0 Transit LSPs: LSPname Incoming-label State pe2 1000002 Dn Total 1, displayed 1, Up 0, Down 1 Bypass LSPs: Total 0, displayed 0, Up 0, Down 0 Segment LSPs: Total 0, displayed 0, Up 0, Down 0
user@crpd3> show route table mpls.0
mpls.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 00:17:31, metric 1 Receive 1 *[MPLS/0] 00:17:31, metric 1 Receive 2 *[MPLS/0] 00:17:31, metric 1 Receive 13 *[MPLS/0] 00:17:31, metric 1 Receive 299776 *[VPN/170] 00:03:07 > to 40.40.40.5 via pe2-ce2, Pop 299776(S=0) *[VPN/170] 00:03:07 > to 40.40.40.5 via pe2-ce2, Pop
bashシェルモードから コマンドを ip -f mpls route
入力します。
user@crpd3:/# ip -f mpls route
299776 via inet 40.40.40.5 dev pe2-ce2 proto 22
bashシェルモードから コマンドを ip route list table 5 10.1.1.1
入力します。
user@crpd3:/# ip route list table 5 10.1.1.1
10.1.1.1 encap mpls 1000003/299776 via 30.30.30.3 dev pe2-p proto 22
意味
PE間の静的LSPがすべてのデバイスで稼働しており、ルートが対応するルートテーブル inet.o
と inet.3
Linux FIBに入力されていることを確認できます。