ネクストホップベースの動的トンネル
例:ネクストホップベースの MPLS-over-UDP 動的トンネルの設定
この例では、トンネル のコンポジット ネクスト ホップを含む動的 MPLS-over-UDP トンネルを設定する方法を示します。MPLS-over-UDP 機能は、デバイスでサポートされている IP トンネルの数を拡張する利点を提供します。
Junos OSリリース18.3R1以降、MPLS-over-UDPトンネルはPTXシリーズルーターおよびQFXシリーズスイッチでサポートされます。PTX ルーターまたは QFX スイッチ上で設定された動的トンネルごとに、トンネル宛先ルートを解決するために、トンネルコンポジットネクストホップ、間接ネクストホップ、および転送ネクストホップが作成されます。また、ポリシー制御を使用して、[edit routing-options dynamic-tunnels]階層レベルでforwarding-rib設定ステートメントを含めることで、選択したプレフィックスに対する動的トンネルを解決できます。
要件
この例では、以下のハードウェアおよびソフトウェアコンポーネントを使用しています。
-
MPCとMICを備えた5つのMXシリーズルーター。
-
プロバイダエッジ(PE)ルーターで実行されている Junos OS リリース 16.2 以降。
始める前に:
-
ループバック インターフェイスを含むデバイス インターフェイスを設定します。
-
デバイスのルーターIDと自動システム番号を設定します。
-
リモートPEデバイスとの内部BGP(IBGP)セッションを確立します。
-
デバイス間で OSPF ピアリングを確立します。
概要
Junos OSリリース16.2以降、動的UDPトンネルは、設定されたすべてのUDPトンネルに対してトンネルコンポジットネクストホップの作成をサポートします。これらのネクストホップベースの動的UDPトンネルは、MPLS-over-UDPトンネルと呼ばれます。トンネルコンポジットネクストホップは、MPLS-over-UDPトンネルに対してデフォルトで有効になっています。
MPLS-over-UDP トンネルは、本質的に双方向または単方向にすることができます。
-
双方向—PE デバイスが MPLS-over-UDP トンネルを介して双方向に接続されている場合、それは双方向 MPLS-over-UDP トンネルと呼ばれます。
-
単方向—2つのPEデバイスが一方向にMPLS-over-UDPトンネルを介して接続され、反対方向にMPLS/IGPを介して接続されている場合、それは単方向MPLS-over-UDPトンネルと呼ばれます。
単方向 MPLS-over-UDP トンネルは、移行シナリオや、2 つの PE デバイスが 2 つの不連続なネットワークを介して相互に接続を提供する場合に使用されます。単方向 MPLS-over-UDP トンネルには逆方向トンネルが存在しないため、トラフィックを転送するには、リモート PE デバイス上でフィルターベースの MPLS-over-UDP カプセル化解除を設定する必要があります。
Junos OSリリース18.2R1以降、PTXシリーズルーターと単方向MPLS-over-UDPトンネルを搭載したQFX10000では、リモートPEデバイスにMPLS-over-UDPパケットの入力フィルターと、リバーストンネル方向にパケットを転送するためのIPおよびUDPヘッダーのカプセル化解除アクションを設定する必要があります。
例えば、リモート PE デバイスであるデバイス PE2 では、単方向 MPLS-over-UDP トンネルに以下の設定が必要です。
PE2
[edit firewall filter] user@host# set Decap_Filter term udp_decap from protocol udp user@host# set Decap_Filter term udp_decap from destination-port 6635 user@host# set Decap_Filter term udp_decap then count UDP_PKTS user@host# set Decap_Filter term udp_decap then decapsulate mpls-in-udp user@host# set Decap_Filter term def then count def_pkt user@host# set Decap_Filter term def then accept
上記の設定例では、 Decap_Filter はMPLS-over-UDPカプセル化解除に使用されるファイアウォールフィルターの名前です。用語 udp_decap は、デバイス PE2 のコアに面するインターフェイスで UDP パケットを受け取り、MPLS-over-UDP パケットを MPLS-over-IP パケットにカプセル化解除して転送するための入力フィルターです。
show firewall filterなどの既存のファイアウォール動作モードコマンドを使用して、フィルターベースのMPLS-over-UDPカプセル化解除を表示することができます。
次に例を示します。
user@host >show firewall filter Decap_Filter Filter: Decap_Filter Counters: Name Bytes Packets UDP_PKTS 16744 149 def_pkt 13049 136
単方向 MPLS-over-UDP トンネルの場合:
-
外部ヘッダーとしてサポートされているのはIPv4アドレスのみです。フィルターベースの MPLS-over-UDP カプセル化解除は、外部ヘッダーの IPv6 アドレスをサポートしていません。
-
カプセル化解除後は、デフォルトのルーティングインスタンスのみがサポートされます。
Junos OSリリース17.1以降、MPCとMICを搭載したMXシリーズルーターで、MPLS-over-UDPトンネルの拡張制限が引き上げられます。
Junosリリース19.2R1以降、MPCとMICを搭載したMXシリーズルーターでは、サポートするキャリアのPEデバイス間に確立された動的IPv4 UDPトンネルを介してMPLSトラフィックを伝送するMPLS-over-UDPトンネルを使用して、キャリアサポートキャリア(CSC)アーキテクチャを展開できます。この機能拡張により、MPLS-over-UDP トンネルが提供する拡張性の利点がさらに高まります。MPLS-over-UDPトンネルでのCSCサポートは、IPv6 UDPトンネルではサポートされていません。
既存の動的トンネル機能には、完全な静的構成が必要です。現在、アドバタイズされたルートのピアデバイスから受信したトンネル情報は無視されます。Junos OSリリース17.4R1以降、MXシリーズルーターでは、ネクストホップベースの動的MPLS-over-UDPトンネルは、BGPカプセル化拡張コミュニティを使用してシグナリングされます。BGPエクスポートポリシーは、トンネルタイプの指定、送信側トンネル情報のアドバタイズ、受信側トンネル情報の解析と伝達に使用されます。受信したタイプのトンネルコミュニティに従って、トンネルが作成されます。
複数のトンネルカプセル化は、BGPによってサポートされています。複数の機能を受信すると、設定されたBGPポリシーとトンネル設定に基づいてネクストホップベースの動的トンネルが作成されます。トンネルを設定するには、トンネルの両端でトンネル優先度が一貫している必要があります。デフォルトでは、MPLS-over-UDPトンネルがGREトンネルよりも優先されます。動的トンネル設定が存在する場合、受信したトンネルコミュニティよりも優先されます。
ネクストホップベースの動的 MPLS-over-UDP トンネルを設定する場合は、以下の点に注意してください。
-
IBGP セッションは PE デバイス間で設定する必要があります。
-
ネクストホップベースの動的トンネルカプセル化(UDPとGRE)間の切り替えが許可されており、これは、各モードでサポートされているIPトンネルのスケーリング値に関して、ネットワークパフォーマンスに影響を与える可能性があります。
-
同じトンネル宛先に対してGREとUDPの両方のネクストホップベースの動的トンネルカプセル化タイプを使用すると、コミットに失敗します。
-
単方向 MPLS-over-UDP トンネルの場合、パケットを転送するために、リモート PE デバイス上でフィルターベースの MPLS-over-UDP カプセル化解除を明示的に設定する必要があります。
-
グレースフルルーティングエンジンスイッチオーバー(GRES)はMPLS-over-UDPでサポートされており、MPLS-over-UDPトンネルタイプのフラグは統一されたISSUおよびNSRに準拠しています。
-
MPLS-over-UDP トンネルは、ライトモードの仮想 MX(vMX)でサポートされています。
-
MPLS-over-UDP トンネルは、新しい IPv4-mapped-IPv6 ネクストホップに基づく動的な GRE トンネル作成をサポートします。
-
MPLS-over-UDP トンネルは Contrail との相互運用性でサポートされています。この場合、MPLS-over-UDP トンネルは contrail vRouter から MX ゲートウェイに作成されます。これを有効にするには、MXシリーズルーターからcontrail vRouterへのルートで以下のコミュニティをアドバタイズする必要があります。
[edit policy-options community] udp members 0x030c:64512:13;
特定の時点で、Contrail vRouterでサポートされているトンネルタイプは、ネクストホップベースの動的GREトンネル、MPLS-over-UDPトンネル、VXLANの1つだけです。
-
ネクストホップベースの動的 MPLS-over-UDP トンネル設定では、以下の機能はサポートされていません。
-
RSVP自動メッシュ
-
プレーンな IPV6 GRE および UDP トンネル設定
-
論理システム
-
トポロジー
図1 は、動的MPLS-over-UDPトンネルを介したレイヤー3 VPNシナリオを示しています。カスタマーエッジ(CE)デバイスであるCE1とCE2は、それぞれプロバイダエッジ(PE)デバイスであるPE1とPE2に接続します。PE デバイスはプロバイダ デバイス(デバイス P1)に接続され、内部 BGP(IBGP)セッションは 2 つの PE デバイスを相互接続します。PEデバイス間には、動的なネクストホップベースの双方向MPL-over-UDPトンネルが設定されます。
MPLS-over-UDP トンネルは次のように処理されます。
-
MPLS-over-UDP トンネルが設定された後、inet.3 ルーティングテーブル内のトンネルに対して、トンネルコンポジットネクストホップを持つトンネル宛先マスクルートが作成されます。このIPトンネルルートは、動的トンネル設定が削除された場合にのみ取り消されます。
トンネルの複合ネクストホップ属性には、次のようなものがあります。
-
レイヤー3 VPNコンポジットネクストホップが無効になっている場合—送信元アドレスと宛先アドレス、カプセル化文字列、VPNラベル
-
レイヤー3 VPNコンポジットネクストホップとプレフィックス単位のVPNラベル割り当てが有効になっている場合-送信元アドレス、宛先アドレス、カプセル化文字列
-
レイヤー3 VPNコンポジットネクストホップが有効で、プレフィックスごとのVPNラベル割り当てが無効になっている場合(送信元アドレス、宛先アドレス、カプセル化文字列)。この場合のルートは、セカンダリルートとともに他の仮想ルーティング転送インスタンステーブルに追加されます。
-
-
PE デバイスは、IBGP セッションを使用して相互接続されます。リモートBGPネイバーへのIBGPルートネクストホップはプロトコルネクストホップであり、トンネルネクストホップを持つトンネルマスクルートを使用して解決されます。
-
プロトコルネクストホップがトンネルコンポジットネクストホップ上で解決された後、転送ネクストホップを持つ間接ネクストホップが作成されます。
-
トンネル コンポジット ネクスト ホップは、間接ネクスト ホップのネクスト ホップを転送するために使用されます。
設定
CLIクイックコンフィグレーション
この例をすばやく設定するには、以下のコマンドをコピーしてテキストファイルに貼り付け、改行を削除し、ネットワーク設定に一致させる必要がある詳細情報を変更し、コマンドを [edit] 階層レベルでCLIにコピーアンドペーストして、設定モードから commit を入力します。
CE1
set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/8 set interfaces lo0 unit 0 family inet address 10.127.0.1/32 set routing-options router-id 10.127.0.1 set routing-options autonomous-system 65200 set protocols bgp group ce1-pe1 export export-loopback-direct set protocols bgp group ce1-pe1 peer-as 100 set protocols bgp group ce1-pe1 neighbor 10.0.0.2 set policy-options policy-statement export-loopback-direct term term-1 from interface lo0.0 set policy-options policy-statement export-loopback-direct term term-1 from route-filter 10.127.0.1/32 exact set policy-options policy-statement export-loopback-direct term term-1 then accept
CE2
set interfaces ge-0/0/0 unit 0 family inet address 203.0.113.2/24 set interfaces lo0 unit 0 family inet address 10.127.0.5/32 set routing-options router-id 10.127.0.5 set routing-options autonomous-system 65200 set protocols bgp group ce1-pe1 export export-loopback-direct set protocols bgp group ce1-pe1 peer-as 65100 set protocols bgp group ce1-pe1 neighbor 203.0.113.1 set policy-options policy-statement export-loopback-direct term term-1 from interface lo0.0 set policy-options policy-statement export-loopback-direct term term-1 from route-filter 10.127.0.5/32 exact set policy-options policy-statement export-loopback-direct term term-1 then accept
PE1
set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.2/8 set interfaces ge-0/0/1 unit 0 family inet address 192.0.2.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.127.0.2/32 set routing-options static route 10.33.0/16 next-hop 192.0.2.2 set routing-options router-id 10.127.0.2 set routing-options autonomous-system 65100 set routing-options forwarding-table export pplb set routing-options dynamic-tunnels gre next-hop-based-tunnel set routing-options dynamic-tunnels udp-dyn-tunnel-to-pe2 source-address 10.127.0.2 set routing-options dynamic-tunnels udp-dyn-tunnel-to-pe2 udp set routing-options dynamic-tunnels udp-dyn-tunnel-to-pe2 destination-networks 10.127.0.0/24 set protocols bgp group IBGP type internal set protocols bgp group IBGP local-address 10.127.0.2 set protocols bgp group IBGP family inet-vpn unicast set protocols bgp group IBGP neighbor 10.127.0.4 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set routing-instances MPLS-over-UDP-PE1 instance-type vrf set routing-instances MPLS-over-UDP-PE1 interface ge-0/0/0.0 set routing-instances MPLS-over-UDP-PE1 route-distinguisher 10.127.0.2:1 set routing-instances MPLS-over-UDP-PE1 vrf-target target:600:1 set routing-instances MPLS-over-UDP-PE1 protocols bgp group pe1-ce1 peer-as 65200 set routing-instances MPLS-over-UDP-PE1 protocols bgp group pe1-ce1 neighbor 10.0.0.1 as-override
P1
set interfaces ge-0/0/0 unit 0 family inet address 192.0.2.2/24 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 unit 0 family inet address 198.51.100.1/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.127.0.3/32 set routing-options router-id 10.127.0.3 set routing-options autonomous-system 65100 set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive
PE2
set interfaces ge-0/0/0 unit 0 family inet address 203.0.113.1/24 set interfaces ge-0/0/1 unit 0 family inet address 198.51.100.2/24 set interfaces ge-0/0/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.127.0.4/8 set routing-options nonstop-routing set routing-options router-id 10.127.0.4 set routing-options autonomous-system 65100 set routing-options forwarding-table export pplb set routing-options dynamic-tunnels udp-dyn-tunnel-to-pe1 source-address 10.127.0.4 set routing-options dynamic-tunnels udp-dyn-tunnel-to-pe1 udp set routing-options dynamic-tunnels udp-dyn-tunnel-to-pe1 destination-networks 10.127.0.0/24 set protocols bgp group IBGP type internal set protocols bgp group IBGP local-address 10.127.0.4 set protocols bgp group IBGP family inet-vpn unicast set protocols bgp group IBGP neighbor 10.127.0.2 set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set routing-instances MPLS-over-UDP-PE2 instance-type vrf set routing-instances MPLS-over-UDP-PE2 interface ge-0/0/0.0 set routing-instances MPLS-over-UDP-PE2 route-distinguisher 10.127.0.4:1 set routing-instances MPLS-over-UDP-PE2 vrf-target target:600:1 set routing-instances MPLS-over-UDP-PE2 protocols bgp group ebgp peer-as 65200 set routing-instances MPLS-over-UDP-PE2 protocols bgp group ebgp neighbor 203.0.113.2 as-override
手順
ステップバイステップの手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、『CLIユーザーガイド』の「設定モードでのCLIエディターの使用」を参照してください。
デバイスPE1を設定するには:
-
デバイスのループバックインターフェイスを含むデバイスインターフェイスを設定します。
[edit interfaces] user@PE1# set ge-0/0/0 unit 0 family inet address 10.0.0.2/8 user@PE1# set ge-0/0/1 unit 0 family inet address 192.0.2.1/24 user@PE1# set ge-0/0/1 unit 0 family mpls user@PE1# set lo0 unit 0 family inet address 10.127.0.2/8
-
デバイス P1 をネクストホップ宛先として、デバイス PE1 からのルートの静的ルートを設定します。
[edit routing-options] user@PE1# set static route 10.33.0.0/16 next-hop 192.0.2.2
-
デバイス PE1 のルーター ID と自律システム番号を設定します。
[edit routing-options] user@PE1# set router-id 10.127.0.2 user@PE1# set autonomous-system 65100
-
(PTXシリーズのみ)ポリシー制御を設定して、選択したプレフィックス上の MPLS-over-UDP 動的トンネル ルートを解決します。
[edit routing-options dynamic-tunnels] user@PTX-PE1# set forwarding-rib inet.0 inet-import dynamic-tunnel-fwd-route-import
-
(PTXシリーズのみ)を介して動的トンネル宛先ルートを解決するためのinet-importポリシーを設定します。
[edit policy-options] user@PTX-PE1# set policy-statement dynamic-tunnel-fwd-route-import term 1 from route-filter 10.127.0.4/32 exact user@PTX-PE1# set policy-statement dynamic-tunnel-fwd-route-import term 1 then accept user@PTX-PE1# set policy-options policy-statement dynamic-tunnel-fwd-route-import then reject
-
PEデバイス間のIBGPピアリングを設定します。
[edit protocols] user@PE1# set bgp group IBGP type internal user@PE1# set bgp group IBGP local-address 10.127.0.2 user@PE1# set bgp group IBGP family inet-vpn unicast user@PE1# set bgp group IBGP neighbor 10.127.0.4
-
管理インターフェイスを除くデバイス PE1 のすべてのインターフェイスで OSPF を設定します。
[edit protocols] user@PE1# set ospf area 0.0.0.0 interface ge-0/0/1.0 user@PE1# set ospf area 0.0.0.0 interface lo0.0 passive
-
デバイス PE1 でネクストホップベースの動的 GRE トンネル設定を有効にします。
注:このステップは、ネクストホップベースの動的GREトンネルとMPLS-over-UDPトンネルの実装の違いを説明する場合にのみ必要です。
[edit routing-options] user@PE1# set dynamic-tunnels gre next-hop-based-tunnel
-
デバイスPE1からデバイスPE2まで、MPLS-over-UDPトンネルパラメータを設定します。
[edit routing-options] user@PE1# set dynamic-tunnels udp-dyn-tunnel-to-pe2 source-address 10.127.0.2 user@PE1# set dynamic-tunnels udp-dyn-tunnel-to-pe2 udp user@PE1# set dynamic-tunnels udp-dyn-tunnel-to-pe2 destination-networks 10.127.0.0/24
-
デバイスPE1上にVRFルーティングインスタンスを設定し、その他のルーティングインスタンスパラメーターを設定します。
[edit routing-instances] user@PE1# set MPLS-over-UDP-PE1 instance-type vrf user@PE1# set MPLS-over-UDP-PE1 interface ge-0/0/0.0 user@PE1# set MPLS-over-UDP-PE1 route-distinguisher 10.127.0.2:1 user@PE1# set MPLS-over-UDP-PE1 vrf-target target:600:1
-
デバイスCE1とのピアリングのルーティングインスタンス設定でBGPを有効にします。
[edit routing-instances] user@PE1# set MPLS-over-UDP-PE1 protocols bgp group pe1-ce1 peer-as 65200 user@PE1# set MPLS-over-UDP-PE1 protocols bgp group pe1-ce1 neighbor 10.0.0.1 as-override
結果
設定モードから、 show interfaces、 show routing-options、 show protocols、および show routing-instances コマンドを入力して設定を確認します。出力に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
user@PE1# show interfaces
ge-0/0/0 {
unit 0 {
family inet {
address 10.0.0.2/8;
}
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 192.0.2.1/24;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.127.0.2/32;
}
}
}
user@PE1# show routing-options
static {
route 10.33.0.0/16 next-hop 192.0.2.2;
}
router-id 10.127.0.2;
autonomous-system 65100;
forwarding-table {
export pplb;
}
dynamic-tunnels {
gre next-hop-based-tunnel;
udp-dyn-tunnel-to-pe2 {
source-address 10.127.0.2;
udp;
destination-networks {
10.127.0.0/24;
}
}
}
user@PE1# show protocols
bgp {
group IBGP {
type internal;
local-address 10.127.0.2;
family inet-vpn {
unicast;
}
neighbor 10.127.0.4;
}
}
ospf {
area 0.0.0.0 {
interface ge-0/0/1.0;
interface lo0.0 {
passive;
}
}
}
user@PE1# show routing-instances
MPLS-over-UDP-PE1 {
instance-type vrf;
interface ge-0/0/0.0;
route-distinguisher 10.127.0.2:1;
vrf-target target:600:1;
protocols {
bgp {
group pe1-ce1 {
peer-as 65200;
neighbor 10.0.0.1 {
as-override;
}
}
}
}
}
デバイスの設定が完了したら、設定モードから commit を入力します。
検証
設定が正常に機能していることを確認します。
- PE デバイス間の接続の検証
- デバイス PE1 の動的トンネル ルートの検証
- デバイス PE2 の動的トンネル ルートの検証
- ルートに期待されるindirect-next-hopフラグがあることを確認する
PE デバイス間の接続の検証
目的
デバイスPE1とデバイスPE2間のBGPピアリングステータスと、デバイスPE2から受信したBGPルートを確認します。
アクション
動作モードから、 show bgp summary および show route receive-protocol bgp ip-address table bgp.l3vpn.0 コマンドを実行します。
user@PE1> show bgp summary
Groups: 2 Peers: 2 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.l3vpn.0
2 2 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.127.0.4 65100 139 136 0 0 58:23 Establ
bgp.l3vpn.0: 2/2/2/0
MPLS-over-UDP-PE1.inet.0: 2/2/2/0
10.10.0.1 65200 135 136 0 0 58:53 Establ
MPLS-over-UDP-PE1.inet.0: 1/1/1/0
user@PE1> show route receive-protocol bgp 10.127.0.4 table bgp.l3vpn.0 bgp.l3vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path 10.127.0.4:1:127.0.0.5/8 * 10.127.0.4 65100 65200 I
意味
-
最初の出力では、BGPセッションの状態は
Establであり、これはセッションが稼働しており、PEデバイスがピアリングされていることを意味します。 -
2番目の出力では、デバイスPE1がデバイスPE2からBGPルートを学習しました。
デバイス PE1 の動的トンネル ルートの検証
目的
デバイス PE1 の inet.3 ルーティングテーブルのルートと動的トンネル データベース情報を確認します。
アクション
動作モードから、 show route table inet.3、 show dynamic-tunnels database terse、 show dynamic-tunnels database、および show dynamic-tunnels database summary コマンドを実行します。
user@PE1> show route table inet.3
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.127.0.0/24 *[Tunnel/300] 00:21:18
Tunnel
127.0.0.4/8 *[Tunnel/300] 00:21:18
Tunnel Composite
user@PE1> show dynamic-tunnels database terse Table: inet.3 Destination-network: 10.127.0.0/24 Destination Source Next-hop Type Status 10.127.0.4/8 10.127.0.2 0xb395b10 nhid 613 udp Up
user@PE1> show dynamic-tunnels database
Table: inet.3
. . .
Tunnel to: 10.127.0.4/32
Reference count: 2
Next-hop type: UDP
Source address: 10.127.0.2 Tunnel Id: 2
Next hop: tunnel-composite, 0xb395b10, nhid 613
VPN Label: Push 299776 Reference count: 3
Traffic Statistics: Packets 0, Bytes 0
State: Up
user@PE1> show dynamic-tunnels database summary Dynamic Tunnels, Total 1 displayed GRE Tunnel: Active Tunnel Mode, Next Hop Base IFL Based, Total 0 displayed, Up 0, Down 0 Nexthop Based, Total 0 displayed, Up 0, Down 0 RSVP Tunnel: Total 0 displayed UDP Tunnel: Total 1 displayed, Up 1, Down 0
意味
-
最初の出力では、デバイス PE1 が MPLS-over-UDP トンネルで設定されているため、inet.3 ルーティングテーブルのルートエントリーに対してトンネル複合ルートが作成されます。
-
残りの出力では、MPLS-over-UDPトンネルが、トンネルカプセル化タイプ、トンネルネクストホップパラメーター、およびトンネルステータスとともに表示されます。
デバイス PE2 の動的トンネル ルートの検証
目的
デバイス PE2 の inet.3 ルーティングテーブル内のルートと動的トンネル データベース情報を確認します。
アクション
動作モードから、 show route table inet.3と show dynamic-tunnels database terse コマンドを実行します。
user@PE2> show route table inet.3
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.127.0.0/24 *[Tunnel/300] 00:39:31
Tunnel
10.127.0.2/32 *[Tunnel/300] 00:24:53
Tunnel Composite
user@PE1> show dynamic-tunnels database terse Table: inet.3 Destination-network: 127.0.0.0/8 Destination Source Next-hop Type Status 10.127.0.2/32 10.127.0.4 0xb395450 nhid 615 udp Up
意味
出力は、デバイスPE1と同様に、MPLS-over-UDPトンネルの作成と、ネクストホップインターフェイスとして割り当てられたネクストホップIDを示しています。
ルートに期待されるindirect-next-hopフラグがあることを確認する
目的
デバイス PE1 とデバイス PE2 が、パケット転送エンジン 転送テーブルで転送ネクストホップ バインディングへの間接ネクストホップを維持するように設定されていることを確認します。
アクション
動作モードから、デバイスPE1とデバイスPE2で show krt indirect-next-hop コマンドを実行します。
user@PE1> show krt indirect-next-hop
Indirect Nexthop:
Index: 1048574 Protocol next-hop address: 10.127.0.4
RIB Table: bgp.l3vpn.0
Label: Push 299776
Policy Version: 1 References: 1
Locks: 3 0xb2ab630
Flags: 0x0
INH Session ID: 0x0
INH Version ID: 0
Ref RIB Table: unknown
Tunnel type: UDP, Reference count: 3, nhid: 613
Destination address: 10.127.0.4, Source address: 10.127.0.2
Tunnel id: 2, VPN Label: Push 299776, TTL action: prop-ttl
IGP FRR Interesting proto count : 1
Chain IGP FRR Node Num : 1
IGP Resolver node(hex) : 0xb3c70dc
IGP Route handle(hex) : 0xb1ae688 IGP rt_entry protocol : Tunnel
IGP Actual Route handle(hex) : 0x0 IGP Actual rt_entry protocol : Any
user@PE2> show krt indirect-next-hop
Indirect Nexthop:
Index: 1048575 Protocol next-hop address: 10.127.0.2
RIB Table: bgp.l3vpn.0
Label: Push 299776
Policy Version: 1 References: 2
Locks: 3 0xb2ab740
Flags: 0x0
INH Session ID: 0x0
INH Version ID: 0
Ref RIB Table: unknown
Tunnel type: UDP, Reference count: 3, nhid: 615
Destination address: 10.127.0.2, Source address: 10.127.0.4
Tunnel id: 1, VPN Label: Push 299776, TTL action: prop-ttl
IGP FRR Interesting proto count : 2
Chain IGP FRR Node Num : 1
IGP Resolver node(hex) : 0xb3d3a28
IGP Route handle(hex) : 0xb1ae634 IGP rt_entry protocol : Tunnel
IGP Actual Route handle(hex) : 0x0 IGP Actual rt_entry protocol : Any
意味
出力は、ネクストホップベースの動的 MPLS-over-UDP トンネルが PE デバイス間に作成されていることを示しています。
トラブルシューティング
ネクストホップベースの動的トンネルのトラブルシューティングについては、次を参照してください。
コマンドのトラブルシューティング
問題点
ネクストホップベースの動的 MPLS-over-UDP トンネル設定は有効になっていません。
ソリューション
ネクストホップベースのMPLS-over-UDPトンネル設定をトラブルシューティングするには、[edit routing-options dynamic-tunnels]ステートメント階層で以下のtracerouteコマンドを使用します。
-
traceoptions file file-name -
traceoptions file size file-size -
traceoptions flag all
次に例を示します。
[edit routing-options dynamic-tunnels]
traceoptions {
file udp_dyn_pe1.wri size 4294967295;
flag all;
}
ネクストホップベースの動的トンネルのなりすまし防止保護の概要
データセンターへの大規模なIPトンネルの導入の増加に伴い、ユーザーが侵害された仮想マシン(VM)からの悪意のあるトラフィックを制限できるセキュリティ対策を追加する必要があります。攻撃の可能性の1つは、ゲートウェイルーターを介して侵害されたサーバーから任意の顧客VPNにトラフィックを注入することです。このような場合、IPトンネルのなりすまし対策チェックにより、正規のソースのみが指定されたIPトンネルからデータセンターにトラフィックを注入していることを確認します。
ネクストホップベースの動的IPトンネルは、デバイス上で作成されるすべての動的トンネルに対して、トンネルコンポジットネクストホップを作成します。ネクストホップベースの動的トンネルでは、新しい動的トンネルが設定されるたびに物理トンネルへの依存性がなくなるため、ネクストホップベースの動的トンネルを設定することで、デバイス上に作成できる動的トンネルの数よりも拡張性に優れています。Junos OSリリース17.1以降、ネクストホップベースの動的IPトンネルのなりすまし防止機能がネクストホップベースの動的トンネルに提供されます。この機能拡張により、セキュリティ対策が実装され、侵害されたサーバーからゲートウェイルーターを介して任意の顧客VPNにトラフィックが注入されることが防止されます。
スプーフィング対策は、パケット転送エンジンのリバースパスフォワーディングチェックを使用して実装されます。チェックは、トンネルを介してルーティングインスタンスに着信するトラフィックに対して実装されます。現在、ゲートウェイルーターがトンネルからトラフィックを受信すると、宛先ルックアップのみが実行され、パケットが適切に転送されます。なりすまし防止保護が有効になっている場合、ゲートウェイルーターは、トンネルの宛先ルックアップに加えて、VPN内のカプセル化パケットIPヘッダーの送信元アドレスルックアップも実行します。これにより、正規の送信元が指定されたIPトンネルを介してトラフィックを注入していることが保証されます。その結果、スプーフィング対策保護により、指定されたトンネル上の正当な送信元からトンネルトラフィックを確実に受信できます。
図2 は、なりすまし防止保護の要件を含むトポロジー例を示しています。
この例では、ゲートウェイルーターはルーターGです。ルーターGには緑と青の2つのVPNがあります。サーバーAとサーバーBの2つのサーバーは、それぞれネクストホップベースの動的トンネルT1とT2を介して、ルーターGのグリーンとブルーVPNに到達できます。サーバーに接続された複数のホストと仮想マシン(P、Q、R、S、T)は、ゲートウェイルーターであるルーターGを介してVPNにアクセスできます。ルーターGには、グリーンVPNとブルーVPNの仮想ルーティングおよび転送(VRF)テーブルがあり、それぞれにこれらのVPN内の仮想マシンの到達可能性情報が入力されています。
例えば、VPN グリーンでは、ルーター G はトンネル T1 を使用してホスト P に到達し、トンネル T2 を使用してホスト R と S に到達し、トンネル T1 と T2 の間でロードバランシングが実行されてマルチホームホスト Q に到達します。VPN Blueでは、ルーターGはトンネルT1を使用してホストPとRに到達し、トンネルT2を使用してホストQとTに到達します。
以下の場合、チェックはリバースパスフォワーディングに合格します。
パケットは、指定されたトンネル上の正規の送信元から送信されます。
VPNグリーンのホストPは、トンネルT1を使用してホストXにパケットを送信します。ルーターGはトンネルT1を介してホストPに到達できるため、パケットの通過を許可し、ホストXにパケットを転送します。
パケットは、指定されたトンネル上のマルチホーム送信元から送信されます。
VPNグリーンのホストQはサーバーAとBでマルチホームされており、トンネルT1とT2を介してルーターGに到達できます。ホストQは、トンネルT1を使用してホストYにパケットを送信し、トンネルT2を使用してホストXにパケットを送信します。ルーターGはトンネルT1とT2を介してホストQに到達できるため、パケットをそれぞれホストYとXに通過させて転送できます。
レイヤー3 VPNでは、デフォルトでスプーフィング対策が有効になっていません。ネクストホップベースの動的トンネルに対してアンチスプーフィングを有効にするには、[edit routing-instances routing-instance-name routing-options forwarding-table]階層レベルでip-tunnel-rpf-checkステートメントを含めます。リバースパスフォワーディングチェックは、VRFルーティングインスタンスにのみ適用されます。デフォルトモードはstrictに設定されており、指定されていないトンネルの送信元から送信されたパケットはチェックに合格しません。ip-tunnel-rpf-checkモードはlooseとして設定できます。この場合、パケットが存在しない送信元から送信された場合、リバースパスフォワーディングチェックは失敗します。オプションのファイアウォールフィルターをip-tunnel-rpf-checkステートメントの下に設定して、リバースパスフォワーディングチェックに失敗したパケットをカウントしてログに記録することができます。
以下の出力例は、なりすまし防止設定を示しています。
[edit routing-instances routing-instance-name routing-options forwarding-table]
ip-tunnel-rpf-check {
mode loose;
fail-filter filter-name;
}
ネクストホップベースの動的トンネルのなりすまし防止保護を設定する際には、以下のガイドラインを考慮してください。
スプーフィング防止保護は、IPv4トンネルとIPv4データトラフィックに対してのみ有効にできます。スプーフィング対策機能は、IPv6トンネルおよびIPv6データトラフィックではサポートされていません。
ネクストホップベースの動的トンネルのアンチスプーフィングは、侵害された仮想マシンを検出して防止できますが(内部ソースのリバースパスフォワーディングチェック)、ラベルスプーフィングされている侵害されたサーバーは検出して防止できません。
ネクストホップベースのIPトンネルは、inet.0ルーティングテーブルで発信および終了できます。
なりすまし防止保護は、VRFルーティングインスタンスにラベルスイッチインターフェイス(LSI)(
vrf-table-labelを使用)または仮想トンネル(VT)インターフェイスがある場合に有効です。VRFルーティングインスタンスper-next-hopラベルでは、なりすまし防止保護はサポートされません。rpf fail-filterは、内部IPパケットにのみ適用されます。なりすまし防止チェックを有効にしても、デバイス上のネクストホップベースの動的トンネルのスケーリング制限には影響しません。
VRFルーティングインスタンスにスプーフィング対策が有効になっている場合のシステムリソース使用率は、スプーフィング対策が有効になっていない場合のネクストホップベースの動的トンネルの使用率よりわずかに高くなります。
なりすまし防止保護には追加の送信元IPアドレスチェックが必要ですが、これはネットワークパフォーマンスへの影響を最小限に抑えます。
グレースフルルーティングエンジンスイッチオーバー(GRES)とインサービスソフトウェアアップグレード(ISSU)は、アンチスプーフィング保護でサポートされています。
例:ネクストホップベースの動的トンネルのなりすまし防止保護の設定
この例では、仮想ルーティングおよび転送(VRF)ルーティングインスタンスのリバースパスフォワーディングチェックを設定し、ネクストホップベースの動的トンネルのアンチスプーフィング保護を有効にする方法を示します。このチェックでは、正規の送信元が指定されたIPトンネルを介してトラフィックを注入していることを確認します。
要件
この例では、以下のハードウェアおよびソフトウェアコンポーネントを使用しています。
MIC搭載のMXシリーズルーター3台、それぞれがホストデバイスに接続。
1 つまたはすべてのルーターで実行されている Junos OS リリース 17.1 以降。
始める前に:
フレキシブルPICコンセントレータでトンネルサービス設定を有効にします。
ルーター インターフェイスを設定します。
ルーター ID を設定し、ルーターの自律システム番号を割り当てます。
トンネルエンドポイントとの内部BGP(IBGP)セッションを確立します。
すべてのルーターでRSVPを設定します。
すべてのルーターでOSPFまたはその他の内部ゲートウェイプロトコルを設定します。
2つのルーター間に2つの動的ネクストホップベースのIPトンネルを設定します。
すべてのルーターとホスト間の接続に対してVRFルーティングインスタンスを設定します。
概要
Junos OSリリース17.1以降、ネクストホップベースの動的IPトンネルにアンチスプーフィング機能が追加され、パケット転送エンジンのリバースパスフォワーディングを使用して、トンネルを介してルーティングインスタンスに着信するトラフィックのチェックが実装されます。
現在、ゲートウェイルーターがトンネルからトラフィックを受信する場合、転送の前に宛先アドレスの検索のみが行われます。なりすまし防止保護機能を使用すると、ゲートウェイルーターはVPN内のカプセル化パケットIPヘッダーの送信元アドレスを検索し、正規の送信元が指定されたIPトンネルを介してトラフィックを注入していることを確認します。これはストリクトモードと呼ばれ、なりすまし防止保護のデフォルトの動作です。指定されていないトンネルからトラフィックを通過させるには、損失モードでリバースパスフォワーディングチェックが有効になります。存在しないソースから受信したトラフィックの場合、リバースパスフォワーディングチェックはストリクトモードとルーズモードの両方で失敗します。
VRFルーティングインスタンスでは、アンチスプーフィングがサポートされています。動的トンネルのアンチスプーフィングを有効にするには、[edit routing-instances routing-instance-name routing-options forwarding-table]階層レベルでip-tunnel-rpf-checkステートメントを含めます。
トポロジー
図3 は、なりすまし防止保護を有効にしたサンプルネットワークトポロジーを示しています。ルーター R0、R1、および R2 はそれぞれ、ホスト Host0、Host1、および Host2 に接続されています。2つの汎用ルーティングカプセル化(GRE)ネクストホップベースの動的トンネル、トンネル1とトンネル2 – ルーターR0をそれぞれルーターR1とR2に接続します。VRFルーティングインスタンスは、各ルーターと接続されたホストデバイスの間で実行されています。
例として、3つのパケット(パケットA、B、およびC)が、ネクストホップベースの動的GREトンネル(トンネル2)を介してルーターR2からトンネルで受信されます。これらのパケットの送信元 IP アドレスは、172.17.0.2(パケット A)、172.18.0.2(パケット B)、172.20.0.2(パケット C)です。
パケットAとBの送信元IPアドレスは、それぞれホスト2とホスト1に属しています。パケットCは存在しない送信元トンネルです。この例で指定されているトンネルはトンネル2で、非指定トンネルはトンネル1です。したがって、パケットは次のように処理されます。
Packet A—送信元が指定されたトンネル(トンネル2)から送信されるため、パケットAはリバースパス転送チェックに合格し、トンネル2を介した転送処理されます。
Packet B—送信元は非宛先トンネルトンネル1から送信されるため、デフォルトでは、パケットBはストリクトモードでのリバースパスフォワーディングチェックに失敗します。ルーズモードが有効になっている場合、パケットBは転送可能です。
Packet C—送信元が存在しないトンネル送信元であるため、パケットCはリバースパスフォワーディングチェックに失敗し、パケットは転送されません。
設定
CLIクイックコンフィグレーション
この例をすばやく設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に一致させる必要がある詳細情報を変更し、コマンドを [edit] 階層レベルでCLIにコピー アンド ペーストして、設定モードから commit を入力します。
ルーターR0
set interfaces ge-0/0/0 unit 0 family inet address 192.0.2.1/24 set interfaces ge-0/0/1 unit 0 family inet address 198.51.100.1/24 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 1 set interfaces ge-0/0/2 unit 0 family inet address 172.16.0.1/16 set interfaces lo0 unit 0 family inet address 10.1.1.1/32 set routing-options router-id 10.1.1.1 set routing-options autonomous-system 100 set routing-options dynamic-tunnels gre next-hop-based-tunnel set routing-options dynamic-tunnels T1 source-address 192.0.2.1 set routing-options dynamic-tunnels T1 gre set routing-options dynamic-tunnels T1 destination-networks 192.0.2.0/24 set routing-options dynamic-tunnels T2 source-address 198.51.100.1 set routing-options dynamic-tunnels T2 gre set routing-options dynamic-tunnels T2 destination-networks 198.51.100.0/24 set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols bgp group IBGP type internal set protocols bgp group IBGP local-address 10.1.1.1 set protocols bgp group IBGP family inet-vpn unicast set protocols bgp group IBGP neighbor 20.1.1.1 set protocols bgp group IBGP neighbor 30.1.1.1 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface all set routing-instances VPN1 instance-type vrf set routing-instances VPN1 interface ge-0/0/2.0 set routing-instances VPN1 route-distinguisher 100:100 set routing-instances VPN1 vrf-target target:100:1 set routing-instances VPN1 vrf-table-label set routing-instances VPN1 routing-options forwarding-table ip-tunnel-rpf-check mode strict set routing-instances VPN1 protocols bgp group External type external set routing-instances VPN1 protocols bgp group External family inet unicast set routing-instances VPN1 protocols bgp group External peer-as 200 set routing-instances VPN1 protocols bgp group External neighbor 172.16.0.1
ルーターR1
set interfaces ge-0/0/0 unit 0 family inet address 192.0.2.2/24 set interfaces ge-0/0/1 vlan-tagging set interfaces ge-0/0/1 unit 0 vlan-id 2 set interfaces ge-0/0/1 unit 0 family inet address 172.18.0.1/16 set interfaces lo0 unit 0 family inet address 20.1.1.1/32 set routing-options router-id 20.1.1.1 set routing-options autonomous-system 100 set routing-options dynamic-tunnels gre next-hop-based-tunnel set routing-options dynamic-tunnels T1 source-address 192.0.2.2 set routing-options dynamic-tunnels T1 gre set routing-options dynamic-tunnels T1 destination-networks 192.0.2.0/24 set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols bgp group IBGP type internal set protocols bgp group IBGP local-address 20.1.1.1 set protocols bgp group IBGP family inet-vpn unicast set protocols bgp group IBGP neighbor 30.1.1.1 set protocols bgp group IBGP neighbor 10.1.1.1 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface all set routing-instances VPN2 instance-type vrf set routing-instances VPN2 interface ge-0/0/1.0 set routing-instances VPN2 route-distinguisher 100:200 set routing-instances VPN2 vrf-target target:200:1 set routing-instances VPN2 vrf-table-label
R2
set interfaces ge-0/0/1 unit 0 family inet address 198.51.100.2/24 set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 unit 0 vlan-id 3 set interfaces ge-0/0/2 unit 0 family inet address 172.17.0.1/16 set interfaces lo0 unit 0 family inet address 30.1.1.1/32 set routing-options router-id 30.1.1.1 set routing-options autonomous-system 100 set routing-options dynamic-tunnels gre next-hop-based-tunnel set routing-options dynamic-tunnels T2 source-address 198.51.100.2 set routing-options dynamic-tunnels T2 gre set routing-options dynamic-tunnels T2 destination-networks 198.51.100.0/24 set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols bgp group IBGP type internal set protocols bgp group IBGP local-address 30.1.1.1 set protocols bgp group IBGP family inet-vpn unicast set protocols bgp group IBGP neighbor 20.1.1.1 set protocols bgp group IBGP neighbor 10.1.1.1 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface all set routing-instances VPN3 instance-type vrf set routing-instances VPN3 interface ge-0/0/2.0 set routing-instances VPN3 route-distinguisher 100:300 set routing-instances VPN3 vrf-target target:300:1 set routing-instances VPN3 vrf-table-label
手順
ステップバイステップの手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、『CLIユーザーガイド』の「設定モードでのCLIエディターの使用」を参照してください。
ルーターR0を設定するには:
ループバック インターフェイスを含む、ルーター R0 のインターフェイスを設定します。
[edit interfaces] user@R0# set ge-0/0/0 unit 0 family inet address 192.0.2.1/24 user@R0# set ge-0/0/1 unit 0 family inet address 198.51.100.1/24 user@R0# set ge-0/0/2 vlan-tagging user@R0# set ge-0/0/2 unit 0 vlan-id 1 user@R0# set ge-0/0/2 unit 0 family inet address 172.16.0.1/16 user@R0# set lo0 unit 0 family inet address 10.1.1.1/32
ルーターR0のルーターIDと自律システム番号を割り当てます。
[edit routing-options] user@R0# set router-id 10.1.1.1 user@R0# set autonomous-system 100
ルーター間でIBGPピアリングを設定します。
[edit protocols] user@R0# set bgp group IBGP type internal user@R0# set bgp group IBGP local-address 10.1.1.1 user@R0# set bgp group IBGP family inet-vpn unicast user@R0# set bgp group IBGP neighbor 20.1.1.1 user@R0# set bgp group IBGP neighbor 30.1.1.1
管理インターフェイスを除くルーターR0のすべてのインターフェイスでOSPFを設定します。
[edit protocols] user@R0# set ospf traffic-engineering user@R0# set ospf area 0.0.0.0 interface lo0.0 passive user@R0# set ospf area 0.0.0.0 interface all
管理インターフェイスを除くルーターR0のすべてのインターフェイスでRSVPを設定します。
[edit protocols] user@R0# set rsvp interface all user@R0# set rsvp interface fxp0.0 disable
ルーターR0でネクストホップベースの動的GREトンネル設定を有効にします。
[edit routing-options] user@R0# set dynamic-tunnels gre next-hop-based-tunnel
ルーターR0からルーターR1への動的GREトンネルパラメータを設定します。
[edit routing-options] user@R0# set dynamic-tunnels T1 source-address 192.0.2.1 user@R0# set dynamic-tunnels T1 gre user@R0# set dynamic-tunnels T1 destination-networks 192.0.2.0/24
ルーターR0からルーターR2への動的GREトンネルパラメーターを設定します。
[edit routing-options] user@R0# set dynamic-tunnels T2 source-address 198.51.100.1 user@R0# set dynamic-tunnels T2 gre user@R0# set dynamic-tunnels T2 destination-networks 198.51.100.0/24
ルーターR0で仮想ルーティングおよび転送(VRF)ルーティングインスタンスを設定し、ホスト1に接続するインターフェイスをVRFインスタンスに割り当てます。
[edit routing-instances] user@R0# set VPN1 instance-type vrf user@R0# set VPN1 route-distinguisher 100:100 user@R0# set VPN1 vrf-target target:100:1 user@R0# set VPN1 vrf-table-label user@R0# set VPN1 interface ge-0/0/2.0
VRFルーティングインスタンス用にホスト1との外部BGPセッションを設定します。
[edit routing-instances] user@R0# set VPN1 protocols bgp group External type external user@R0# set VPN1 protocols bgp group External family inet unicast user@R0# set VPN1 protocols bgp group External peer-as 200 user@R0# set VPN1 protocols bgp group External neighbor 172.16.0.1
ルーターR0のVRFルーティングインスタンスにスプーフィング防止保護を設定します。これにより、ルーター0のネクストホップベースの動的トンネルT1およびT2のリバースパスフォワーディングチェックが有効になります。
[edit routing-instances] user@R0# set VPN1 routing-options forwarding-table ip-tunnel-rpf-check mode strict
結果
設定モードから、 show interfaces、 show routing-options、 show protocols、 show routing-options コマンドを入力して設定を確認します。出力に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
user@R0# show interfaces
ge-0/0/0 {
unit 0 {
family inet {
address 192.0.2.1/24;
}
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 198.51.100.1/24;
}
}
}
ge-0/0/2 {
vlan-tagging;
unit 0 {
vlan-id 1;
family inet {
address 172.16.0.1/16;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.1.1.1/32;
}
}
}
user@R0# show routing-options
router-id 10.1.1.1;
autonomous-system 100;
dynamic-tunnels {
gre next-hop-based-tunnel;
T1 {
source-address 192.0.2.1;
gre;
destination-networks {
192.0.2.0/24;
}
}
T2 {
source-address 198.51.100.1;
gre;
destination-networks {
198.51.100.0/24;
}
}
}
user@R0# show protocols
rsvp {
interface all;
interface fxp0.0 {
disable;
}
}
bgp {
group IBGP {
type internal;
local-address 10.1.1.1;
family inet-vpn {
unicast;
}
neighbor 20.1.1.1;
neighbor 30.1.1.1;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface lo0.0 {
passive;
}
interface all;
}
}
user@R0# show routing-instances
VPN1 {
instance-type vrf;
interface ge-0/0/2.0;
route-distinguisher 100:100;
vrf-target target:100:1;
vrf-table-label;
routing-options {
forwarding-table {
ip-tunnel-rpf-check {
mode strict;
}
}
}
protocols {
bgp {
group External {
type external;
family inet {
unicast;
}
peer-as 200;
neighbor 172.16.0.1;
}
}
}
}
検証
設定が正常に機能していることを確認します。
基本設定の検証
目的
ルーターR0とルーターR1およびR2の間のOSPFおよびBGPピアリングステータスを確認します。
アクション
動作モードから、 show ospf neighbor と show bgp summaryコマンドを実行します。
user@R0> show ospf neighbor
Address Interface State ID Pri Dead
192.0.2.2 ge-0/0/0.0 Full 20.1.1.1 128 32
198.51.100.2 ge-0/0/1.0 Full 30.1.1.1 128 32
user@R0> show bgp summary
Groups: 2 Peers: 3 Down peers: 1
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.l3vpn.0
0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
20.1.1.1 100 182 178 0 0 1:20:27 Establ
bgp.l3vpn.0: 0/0/0/0
30.1.1.1 100 230 225 0 0 1:41:51 Establ
bgp.l3vpn.0: 0/0/0/0
172.16.0.1 200 0 0 0 0 1:42:08 Establ
意味
OSPFおよびBGPセッションは、ルーターR0、R1、およびR2間で稼働しています。
動的トンネル設定の検証
目的
ルーターR0とルーターR1およびR2の間のネクストホップベースの動的GREトンネルのステータスを確認します。
アクション
動作モードから、 show route table inet.3と show dynamic-tunnels database terse コマンドを実行します。
user@R0> show route table inet.3
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.0.2.0/24 *[Tunnel/300] 01:47:57
Tunnel
192.0.2.2/24 *[Tunnel/300] 01:47:57
Tunnel Composite
198.51.100.0/24 *[Tunnel/300] 01:47:57
Tunnel
198.51.100.2/24 *[Tunnel/300] 01:47:57
Tunnel Composite
user@R0> show dynamic-tunnels database terse Table: inet.3 Destination-network: 192.0.2.0/24 Destination Source Next-hop Type Status 192.0.2.2/24 192.0.2.1 0xb395e70 nhid 612 gre Up Destination-network: 198.51.100.0/24 Destination Source Next-hop Type Status 198.51.100.2 198.51.100.1 0xb395e70 nhid 612 gre Up
意味
ネクストホップベースの2つの動的GREトンネル、トンネル1とトンネル2が稼働しています。
なりすまし防止保護設定の検証
目的
ルーターR0のVRFルーティングインスタンスでリバースパスフォワーディングチェックが有効になっていることを確認します。
アクション
動作モードから、 show krt table VPN1.inet.0 detailを実行します。
user@R0> show krt table VPN1.inet.0 detail
KRT tables:
VPN1.inet.0 : GF: 1 krt-index: 8 ID: 0 kernel-id: 8
flags: (null)
tunnel rpf config data : enable, strict, filter [0], 0x2
tunnel rpf tlv data : enable, strict, filter [0], 0x4
unicast reverse path: disabled
fast-reroute-priority: 0
Permanent NextHops
Multicast : 0 Broadcast : 0
Receive : 0 Discard : 0
Multicast Discard: 0 Reject : 0
Local : 0 Deny : 0
Table : 0
意味
設定されたリバースパスフォワーディングチェックは、ストリクトモードのVRFルーティングインスタンスで有効になります。
ネクストホップベースの動的トンネルローカリゼーションの概要
ネクストホップベースの動的トンネルには、GRE(Generic Routing Encapsulation)トンネルや MPLS-over-UDP トンネルが含まれます。これらのトンネルは、インターフェイスベースのトンネルに比べて拡張性上の利点があります。ただし、ネクストホップベースの動的トンネルは、インターフェースベースのトンネルとは異なり、本質的にアンカーレスであり、トンネルの転送情報はデバイス上のすべてのラインカード上のパケット転送エンジン(PFE)に配信されます。これにより、デバイスでサポートされるトンネルの最大数が、1 枚のライン カードのトンネル容量に制限されます。ローカリゼーションのサポートにより、ネクストホップベースの動的トンネルローカリゼーションを設定して、アンカーPFEとして指定されたラインカードのPFE上でのみ転送情報を作成できます。デバイス上の他のラインカードのPFEには、パケットをアンカーPFEに誘導するためのステートフォワーディング情報があります。これにより、デバイスでサポートされるトンネルの最大数を増やすことで、スケーリング上の利点が得られます。
- ネクストホップベースの動的トンネルローカリゼーションのメリット
- ネクストホップベースの動的トンネルローカリゼーションのユースケース
- ネクストホップベースの動的トンネルのローカライズによるトラフィック処理
- ネクストホップベースの動的トンネルローカリゼーションの設定
- ローカライズされたネクストホップベースの動的トンネルのトラブルシューティング
- ネクストホップベースの動的トンネルローカライゼーションでサポートされていない機能
ネクストホップベースの動的トンネルローカリゼーションのメリット
デバイスでサポートされるトンネルの最大数を増やすことで、拡張性の利点を提供します。
ネクストホップベースの動的トンネルローカリゼーションのユースケース
多数のMS-MPCをホストするIPsecゲートウェイデバイスは、IPSecトンネルを終端するために使用され、中程度の負荷をサポートする必要があります。このサポートは、デバイスの拡張限界に達したときにネクストホップベースの動的トンネルを使用すると影響を受けます。ネクストホップベースの動的トンネルのローカライズにより、サポートされるトンネルの最大数が増加し、デバイスは追加のファブリックホップを犠牲にしてより多くのトンネルを収容できるようになります。
仮想パブリッククラウドデータセンターなどのインターネットまたはVPNゲートウェイデバイスの場合、ゲートウェイデバイスは多数のサーバーと通信する必要があります。データセンターサーバーには、ネクストホップベースの動的トンネルを介して到達可能です。動的トンネルのアンカーレスプロパティは、デバイスの全体的なスケーリング数を制限します。ゲートウェイデバイスは複数のMPCをホストしており、トラフィック需要が増加します。ネクストホップベースの動的トンネルをローカライズすることで、トンネルを複数の MPC に分散させることが可能となり、トンネルの拡張数を増やすことができます。
ネクストホップベースの動的トンネルのローカライズによるトラフィック処理
ローカリゼーションのサポートにより、ネクストホップベースの動的トンネル状態はアンカーパケット転送エンジンにローカライズされ、もう一方のパケット転送エンジンはトラフィックをトンネルアンカーに誘導するためのトンネル状態になります。
図4 は、ローカライズを使用しないネクストホップベースの動的トンネルの転送パスを示しています。
を使用しないネクストホップベースの動的トンネルの転送パス
図5 は、ローカライゼーションを使用したネクストホップベースの動的トンネルの転送パスを示しています。
を使用したネクストホップベースの動的トンネルの転送パス
ネクストホップベースの動的トンネルローカリゼーションの設定
ローカライズサポートは、新しく作成されたネクストホップベースの動的トンネル、または既存の非ローカル動的トンネルに対して設定できます。
新しいネクストホップベースの動的トンネルのローカライゼーションの設定
ネクストホップベースの動的トンネルのローカライズでは、ポリシーベースのアプローチを使用してプレフィックスグループを指定します。つまり、ルートポリシーを使用して、ネクストホップベースの動的トンネルにローカライゼーションプロパティを適用します。動的トンネル属性プロファイルは、ポリシーを使用してプレフィックスグループに関連付けるためのルーティングオプションで作成および設定されます。
動的トンネルプロファイルの作成
動的トンネルプロファイルは、トンネルタイプとアンカーパケット転送エンジン情報を指定します。動的トンネルをローカライズするために、複数の動的トンネルプロファイルを作成できます。動的トンネル タイプの値は、GRE、UDP、または BGP-SIGNAL です。
BGP-SIGNALは有効なトンネルタイプではありませんが、BGP-SIGNALをトンネルタイプとして割り当てると、BGPシグナル属性から作成されたトンネルがローカライズされます。BGP-SIGNALを使用する場合、トンネルタイプは、TLVでBGPがアドバタイズするタイプに基づいて決定されます。BGP-SIGNALトンネルは常にネクストホップベースのトンネルです。BGP-SIGNALによって動的に作成されるGREトンネルは、ユーザーがIFLを使用するようにGREによって作成されたトンネルを手動で設定している場合でも、常にネクストホップベースです。
アンカーパケット転送エンジンの値は、アンカーパケット転送エンジンのラインカードです(例:pfe-x/y/0)。この情報は、
show interfaces terse pfe*コマンドの出力から確認できます。Sample Configuration:
[edit routing-options] dynamic-tunnels { dynamic-tunnel-attributes attribute-1 { dynamic-tunnel-type <GRE | UDP | BGP-SIGNAL>; dynamic-tunnel-anchor-pfe pfe-1/0/0; } }動的トンネルプロファイルをプレフィックスリストに関連付けます。
アクションとして
dynamic-tunnel-attributesでポリシーを設定すると、動的トンネルがプレフィックスリストに関連付けられます。ポリシーfromアクションにより、プレフィックス範囲、コミュニティ、BGPルートの送信元アドレスなど、任意の一致条件に対して指定された属性を持つトンネルを作成できます。Sample configuration:
[edit policy-options] policy-statement policy-name { term term { from { <route-filter | next-hop | community>>; } then { dynamic-tunnel-attributes <attribute-name>; } } }転送テーブルエクスポートポリシーの下にトンネルポリシーを含めます。
ポリシーが設定されると、ポリシーを解析するための転送テーブルエクスポートポリシーに含まれます。
export-policyを使用すると、トンネル属性がルートに関連付けられます。BGPからのルートが解決のためにキューに入れられるたびに、転送テーブルのエクスポートポリシーが評価され、適用されたフィルターに基づいてポリシーモジュールからトンネル属性が取得されます。取得されたトンネル属性は、トンネル複合ネクストホップの形でネクストホップにアタッチトンネルされます。パケット転送エンジン名とトンネルタイプに基づいて、対応するアンカー転送構造が作成され、トンネル コンポジット ネクスト ホップが送信される前に転送テーブルに送信されます。ただし、どの属性もトンネルの複合ネクストホップにマッピングされない場合は、ローカライズされていない動的トンネルと同様に、すべてのパケット転送エンジンで転送構造が作成されます。
Sample configuration:
[edit routing-options] forwarding-table { export dynamic-tunnel; }
既存のネクストホップベースの動的トンネルのローカライゼーションの設定
動的トンネル属性をその場で変更すると、メモリ使用率が高くなるためにFPCがクラッシュする可能性があります。そのため、ローカリゼーションを設定する前に、動的トンネル設定を無効にすることをお勧めします。
既存のネクストホップベースの動的トンネルのトンネル属性を更新するには、以下を実行する必要があります。
[edit routing-options]階層レベルでdynamic-tunnels設定を無効化します。Sample configuration:
[edit routing-options] user@host# deactivate dynamic-tunnels user@host# commit
必要に応じてトンネルの属性を変更します。
[edit routing-options]階層レベルでdynamic-tunnels設定をアクティブにします。Sample configuration:
[edit routing-options] user@host# activate dynamic-tunnels user@host# commit
既存の非ローカルネクストホップベースの動的トンネルのローカライズを設定するには:
既存の非ローカルネクストホップベースの動的トンネルのローカライゼーション設定をその場で変更すると、メモリ使用率が高くなるためにFPCがクラッシュする可能性があります。そのため、ローカリゼーションを設定する前に、動的トンネル設定を無効にすることをお勧めします。
[edit routing-options]階層レベルでdynamic-tunnels設定を無効にします。トンネル属性プロファイルを作成し、新しいネクストホップベースの動的トンネルと同様に、動的トンネルをローカライズするためのポリシーを追加します。
dynamic-tunnels設定を有効にします。
ローカライズされたネクストホップベースの動的トンネルのトラブルシューティング
ネクストホップベースの動的トンネルのローカライズにより、トンネルの複合ネクストホップはアンカーパケット転送エンジンIDに関連付けられます。以下の [edit routing-options] 階層レベルのtraceroute設定ステートメントは、ローカライズされた動的トンネルのトラブルシューティングに役立ちます。
dynamic-tunnels traceoptions flag all—DTMでのトンネルの作成と削除を追跡します。resolution traceoptions flag tunnel—BGPルートでのリゾルバー操作を追跡します。forwarding-table traceoptions flag all—カーネルに送信されたトンネルを追跡します。traceoptions flag all- ルート学習プロセスの追跡。
以下のコマンドを使用して、ルートがローカライズされたネクストホップベースの動的トンネルを使用しているかどうかを確認できます。
show route prefix extensive—間接ネクストホップを取得します。
次に例を示します。
user@host> show route 1.2.3.4 extensive MPLS-over-UDP-PE1.inet.0: 24 destinations, 26 routes (24 active, 0 holddown, 0 hidden) 1.2.3.4/32 (1 entry, 1 announced) TSI: KRT in-kernel 1.2.3.4/32 -> {indirect(1048577)} Page 0 idx 1, (group pe1-ce1 type External) Type 1 val 0xb209a78 (adv_entry) Advertised metrics: Nexthop: Self AS path: [100] I Communities: target:600:1 encapsulation:mpls-in-udp(0xd)show krt indirect-next-hop index indirect-next-hop detail—間接ネクストホップの詳細出力でアンカーパケット転送エンジンフィールドを確認します。
次に例を示します。
user@host> show krt indirect-next-hop index 1048577 detail Indirect Nexthop detail: Index: 1048577 Protocol next-hop address: 1.1.1.6 RIB Table: bgp.l3vpn.0 Label: Push 299808 Policy Version: 2 References: 11 Locks: 3 0xb227980 Flags: 0x0 INH Session ID: 0x0 Ref RIB Table: unknown Export policy detail: (Dynamic tunnel hash : 309985522) Tunnel type: UDP, Reference count: 4, nhid: 1016 Destination address: 1.1.1.6, Source address: 1.1.1.2 Anchored-PFE: pfe-1/0/0 VPN Label: Push 299808, TTL action: prop-ttl IGP FRR Interesting proto count : 11 Chain IGP FRR Node Num : 1 IGP Resolver node(hex) : 0xc838b94 IGP Route handle(hex) : 0xb1d7674 IGP rt_entry protocol : Tunnel IGP Actual Route handle(hex) : 0x0 IGP Actual rt_entry protocol : Any
ネクストホップベースの動的トンネルローカライゼーションでサポートされていない機能
Junos OS は、ネクストホップベースの動的トンネルのローカライズでは、以下の機能をサポートしていません。
[edit routing-options forwarding-table chained-composite-next-hop ingress l3vpn]階層レベルで連鎖されたコンポジットネクストホップ。アンカーパケット転送エンジンの耐障害性
ローカライゼーションを備えたネクストホップベースの動的トンネルに対する耐障害性サポートはありません。ネクストホップベースの動的トンネルをローカライズした後、アンカーのパッカー転送エンジンがデバイス上の任意のトンネルを処理するための単一のエンティティになります。アンカーパッカー転送エンジンの耐障害性はサポートされていませんが、ゲートウェイデバイスでは、ゲートウェイデバイスの冗長性により、トンネルのコンポジットネクストホップが委任されているパッカー転送エンジンがダウンした場合、トラフィックを冗長ゲートウェイデバイスに再ルーティングする必要があります。ルーティングプロトコルプロセスは、パッカー転送エンジンの状態を監視し、そのパッカー転送エンジンに固定されたトンネル複合ネクストホップを指すすべてのルートのBGPアドバタイズを取り消します。
アンカーされたパケット転送エンジンのみが本格的なトンネルコンポジットネクストホップを持ち、他のすべてのパケット転送エンジンは、アンカーパケット転送エンジンにトラフィックを転送するためのステアリングエントリーのみを持っています。これらのステアリングエントリーは、アンカーFPCがダウンしても取り消されません。
ネクストホップベースの動的トンネルのローカライズは、論理システムではサポートされていません。
IPv6は、ネクストホップベースの動的トンネルのローカライズではサポートされていません。
ローカライズでは、アンカーパケット転送エンジンラインカードの状態がアップしていない場合、
show dynamic-tunnels database summaryコマンドは正確なトンネル概要を表示しません。回避策として、コマンド出力show dynamic-tunnels databaseとshow dynamic-tunnels database terseを使用します。
IP-over-IPカプセル化を使用したネクストホップベースの動的トンネリングの概要
利点
IP-over-IPトンネリングには、次のようなメリットがあります。
-
Alternative to MPLS over UDP—MPLS-over-UDPトンネリングの代替として使用して、サービスごとに専用デバイスが存在するIPサービスを提供します。
-
Ability to steer specific traffic—ルートをフィルタリングして、MPLSトンネルではなくIPトンネルを介して特定のトラフィックを誘導できるため、MPLSネットワークとIPネットワークが共存する場合、スムーズな移行が可能になります。
-
Ability to support tunnels at increasing scale—コントロールプレーンを使用した動的なトンネル作成BGP大規模なトンネル作成を容易にできます。
IP-over-IP動的ネクストホップベーストンネリングとは何ですか?
IPネットワークには、エッジデバイスとコアデバイスが含まれます。これらのデバイス間でより高い拡張性と信頼性を実現するには、オーバーレイカプセル化を使用して、エッジデバイスが対話する外部ネットワークからコアネットワークを論理的に分離する必要があります。
Junos OSリリース20.3R1以降、IPトランスポートネットワーク上でのIPオーバーレイの構築を容易にするために、IP-over-IPカプセル化をサポートしています。IP over IPは、ネクストホップベースのインフラストラクチャに依存して、より大規模なネットワークをサポートします。この機能は、IPv6およびIPv4ペイロードのIPv4カプセル化をサポートします。サポートされている他のオーバーレイカプセル化の中で、IP-over-IPカプセル化が許可される唯一の種類です。
-
内部ペイロードを解析し、ハッシュ計算に内部パケットフィールドを使用するトランジットデバイス
-
スループットを低下させることなく、トンネル内との間でトラフィックをルーティングするための顧客エッジデバイス
MXシリーズルーターでは、ルーティングプロトコルデーモン(RPD)がトンネルコンポジットネクストホップでカプセル化ヘッダーを送信し、パケット転送エンジン(PFE)がトンネル宛先アドレスを見つけてパケットを転送します。PTXシリーズルーターとQFX10000スイッチでは、RPDは完全に解決されたネクストホップベースのトンネルをパケット転送エンジンに送信します。BGPプロトコルは、ルートの配信と動的トンネルのシグナリングに使用されます。
次の図は、R-2 と R-4 の間に確立された IP over IP トンネルを介して R-1 から R-5 に IPv4 または IPv6 トラフィックがどのように送信されるかを示しています。
IP-over-IPトンネルスティッチング
Junos OSリリース21.3R1では、MX240、MX480、MX960、PTX1000、PTX10008、PTX10016、QFX10002にIP-over-IPトンネルステッチが導入されています。この機能を使用して、デバイス上のIP-over-IPトンネルを終了し、同じデバイス上の別のトンネルを開始できます。デバイスがIP-over-IPパケットを受信すると、外部パケットヘッダーのカプセル化が解除され、内部パケットルックアップが行われます。次に、内部IPパケットヘッダーは同じデバイス上の別のトンネルを指し示し、同じデバイスが別のIP-over-IPヘッダーでパケットを再度カプセル化します。
例:ネクストホップベースのIP-over-IP動的トンネルの設定
IP-over-IPカプセル化を使用してネクストホップベースのトンネルを設定する方法を学びましょう。
- 要件
- 概要
- プロトコルネクストホップを使用したIP-over-IP動的トンネルの設定
- 例:静的設定を使用した inetcolor.0 を介して解決される LDP トンネルを使用した MPLS 環境での IPoIP トンネルの設定
- 例:MPLSクラウドでLDPトンネルを使用したIPoIPトンネルを設定する、BGPシグナリングを使用してinetcolor.0で解決
- 検証
要件
この例では、以下のハードウェアおよびソフトウェアコンポーネントを使用しています。
5 MXシリーズルーター。
Junos OSリリース20.3R1以降のバージョン。
- サポートされているプラットフォームについては 、機能エクスプローラー を参照してください。
概要
Junos OSリリース20.3R1以降、IPトランスポートネットワーク上でのIPオーバーレイの構築を容易にするために、IP-over-IPカプセル化をサポートしています。この例では、OSPFコアを介して接続されたR2とR4間のIBGPピアリングを介して、プロトコルネクストホップ(PNH)を持つデバイス間にユニキャストIP-over-IPトンネルを確立し、ルートを交換し、動的トンネルをシグナリングする様子を示しています。
トポロジー
図1は、5台のデバイスを使用したIP-over-IPのシナリオを示しています。
この例では、R2 と R4 の間に確立された IP-over-IP ダイナミック トンネルを介して、R1 から R5 へ、またはその逆のルートを交換しています。プロトコルIS-ISを使用して、R1からのルートはR2にエクスポートされ、R5からのルートはR4にエクスポートされます。R2 から R4 に Tunnel-01 ユニキャスト IPIP トンネルを設定し、R4 から R2 に別の トンネル Tunnel-01 を設定します。ピアデバイスの設定された宛先ネットワークからネットワークマスク内に生成されたルートプレフィックスを使用して、トンネルを作成し、トンネル内のルートの反対方向にトラフィックフローを流します。
プロトコルネクストホップを使用したIP-over-IP動的トンネルの設定
CLIクイックコンフィグレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキストファイルに貼り付け、改行を削除し、ネットワーク設定に一致させる必要がある詳細情報を変更し、コマンドを [edit] 階層レベルでCLIにコピーアンドペーストして、設定モードからコミットを入力します。
R1
set interfaces xe-0/2/0 unit 0 description R1-to-R2 set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.1/30 set interfaces xe-0/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.255.1/32 set interfaces lo0 unit 0 family iso address 49.0001.1920.1682.5501.00 set routing-options router-id 192.168.255.1 set protocols isis interface xe-0/2/0.0 set protocols isis interface lo0.0 set protocols isis level 1 disable
R2
set interfaces xe-0/2/0 description R2-to-R1 set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.2/30 set interfaces xe-0/2/0 unit 0 family iso set interfaces xe-0/2/1 description R2-to-R3 set interfaces xe-0/2/1 unit 0 family inet address 10.1.23.1/30 set interfaces lo0 unit 0 family inet address 10.1.255.2/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.1255.0002.00 set policy-options policy-statement export-bgp term t1 from protocol bgp set policy-options policy-statement export-bgp term t1 then accept set policy-options policy-statement export-isis term t1 from protocol isis set policy-options policy-statement export-isis term t1 then next-hop self set policy-options policy-statement export-isis term t1 then accept set routing-options resolution rib inet.0 resolution-ribs inet.3 set routing-options router-id 10.1.255.2 set routing-options autonomous-system 65000 set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.2 set routing-options dynamic-tunnels Tunnel-01 ipip set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 set protocols bgp group iBGP type internal set protocols bgp group iBGP local-address 10.1.255.2 set protocols bgp group iBGP family inet unicast set protocols bgp group iBGP export export-isis set protocols bgp group iBGP neighbor 10.1.255.4 set protocols isis interface xe-0/2/0.0 set protocols isis interface lo0.0 set protocols isis level 1 disable set protocols isis export export-bgp set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface lo0.0
R3
set interfaces xe-0/2/0 unit 0 description R3-to-R2 set interfaces xe-0/2/0 unit 0 family inet address 10.1.23.2/30 set interfaces xe-0/2/1 unit 0 description R3-to-R4 set interfaces xe-0/2/1 unit 0 family inet address 10.1.34.1/30 set interfaces lo0 unit 0 family inet address 10.1.255.3/32 set routing-options router-id 10.1.255.3 set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive
R4
set interfaces xe-0/2/0 unit 0 description R4-to-R3 set interfaces xe-0/2/0 unit 0 family inet address 10.1.34.2/30 set interfaces xe-0/2/1 unit 0 description R4-to-R5 set interfaces xe-0/2/1 unit 0 family inet address 192.168.45.1/30 set interfaces xe-0/2/1 unit 0 family iso set interfaces lo0 unit 0 family inet address 10.1.255.4/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.1255.0004.00 set policy-options policy-statement export-bgp term t1 from protocol bgp set policy-options policy-statement export-bgp term t1 then accept set policy-options policy-statement export-isis term t1 from protocol isis set policy-options policy-statement export-isis term t1 then next-hop self set policy-options policy-statement export-isis term t1 then accept set routing-options resolution rib inet.0 resolution-ribs inet.3 set routing-options router-id 10.1.255.4 set routing-options autonomous-system 65000 set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.4 set routing-options dynamic-tunnels Tunnel-01 ipip set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 set protocols bgp group iBGP type internal set protocols bgp group iBGP local-address 10.1.255.4 set protocols bgp group iBGP family inet unicast set protocols bgp group iBGP export export-isis set protocols bgp group iBGP neighbor 10.1.255.2 set protocols isis interface xe-0/2/1.0 set protocols isis interface lo0.0 set protocols isis level 1 disable set protocols isis export export-bgp set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 set protocols ospf area 0.0.0.0 interface lo0.0
R5
set interfaces xe-0/2/0 unit 0 description R5-to-R4 set interfaces xe-0/2/0 unit 0 family inet address 192.168.45.2/30 set interfaces xe-0/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.255.5/32 set interfaces lo0 unit 0 family iso address 49.0001.1920.1682.5505.00 set routing-options router-id 192.168.255.5 set protocols isis interface xe-0/2/0.0 set protocols isis interface lo0.0 set protocols isis level 1 disable
プロトコルネクストホップを使用したIP-IP動的トンネルの設定
R1 の手順
R1とR5の設定が似ているため、R1の手順のみを順を追って説明します。
-
R1で設定モードにします。
-
R2とインターフェイスlo0に接続されたインターフェイスを設定します。ファミリー
inetとisoの両方を設定してください。プロトコルIS-ISにはファミリーisoが必要です。[edit] user@R1# set interfaces xe-0/2/0 unit 0 description R1-to-R2 user@R1# set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.1/30 user@R1# set interfaces xe-0/2/0 unit 0 family iso user@R1# set interfaces lo0 unit 0 family inet address 192.168.255.1/32 user@R1# set interfaces lo0 unit 0 family iso address 49.0001.1920.1682.5501.00
-
ルーターIDを設定します。
[edit] user@R1# set routing-options router-id 192.168.255.1
-
プロトコル IS-IS を設定します。ルートは、IS-ISプロトコルを使用してR1とR2の間でアドバタイズされます。
[edit] user@R1# set protocols isis interface xe-0/2/0.0 user@R1# set protocols isis interface lo0.0 user@R1# set protocols isis level 1 disable
-
設定モードから R1 の
commitを入力します。
R2 の手順
R2とR4の設定が似ているため、R2の手順のみを順を追って説明します。
-
R2で設定モードにします。
-
R1、R3、およびインターフェイスlo0に接続されたインターフェイスを設定します。R1とlo0に接続されたインターフェイスで
inetファミリーとisoの両方を設定してください。[edit] user@R2# set interfaces xe-0/2/0 description R2-to-R1 user@R2# set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.2/30 user@R2# set interfaces xe-0/2/0 unit 0 family iso user@R2# set interfaces xe-0/2/1 description R2-to-R3 user@R2# set interfaces xe-0/2/1 unit 0 family inet address 10.1.23.1/30 user@R2# set interfaces lo0 unit 0 family inet address 10.1.255.2/32 user@R2# set interfaces lo0 unit 0 family iso address 49.0001.0010.1255.0002.00
-
R1に接続されたインターフェイスのプロトコルIS-ISを設定します。BGPルートをIS-ISにアドバタイズするためのエクスポートポリシーは、ポリシー設定ステップで示されています。
[edit] user@R2# set protocols isis interface xe-0/2/0.0 user@R2# set protocols isis interface lo0.0 user@R2# set protocols isis level 1 disable user@R2# set protocols isis export export-bgp
-
lo0到達可能性を得るために、R3に接続されたインターフェイスのOSPFプロトコルを設定します。
[edit] user@R2# set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 user@R2# set protocols ospf area 0.0.0.0 interface lo0.0
-
R2とR4の間で
router-idとautonomous-system、およびIBGPを設定します。IS-IS ルートを BGP にアドバタイズするためのエクスポートポリシーは、ポリシー設定ステップで示されています。[edit] user@R2# set routing-options router-id 10.1.255.2 user@R2# set routing-options autonomous-system 65000 user@R2# set protocols bgp group iBGP type internal user@R2# set protocols bgp group iBGP local-address 10.1.255.2 user@R2# set protocols bgp group iBGP family inet unicast user@R2# set protocols bgp group iBGP export export-isis user@R2# set protocols bgp group iBGP neighbor 10.1.255.4
-
前の手順で適用された BGP および IS-IS のエクスポートポリシーを設定します。
export-bgpポリシーは、BGPルートをIS-ISにアドバタイズするためのエクスポートとしてIS-ISプロトコルに適用され、export-isisポリシーはBGPにIS-ISルートをアドバタイズするためのエクスポートとしてBGPに適用されます。ネクストホップ自己オプションにより、R2は、R1のインターフェイスネクストホップではなく、R2をネクストホップとして、IS-ISルートをBGPにアドバタイズできます。[edit] user@R2# set policy-options policy-statement export-bgp term t1 from protocol bgp user@R2# set policy-options policy-statement export-bgp term t1 then accept user@R2# set policy-options policy-statement export-isis term t1 from protocol isis user@R2# set policy-options policy-statement export-isis term t1 then next-hop self user@R2# set policy-options policy-statement export-isis term t1 then accept
-
R2 から R4 への IP-IP ダイナミック トンネル Tunnel-01 を設定します。コンフィギュレーションオプション
resolution-ribs inet.3は、inet.3でルート解決を行うことを可能にし、トンネルを確立するために必要です。[edit] user@R2# set routing-options resolution rib inet.0 resolution-ribs inet.3 user@R2# set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.2 user@R2# set routing-options dynamic-tunnels Tunnel-01 ipip user@R2# set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24
-
(オプション) - R2からR4に Tunnel-01 IP-IP動的トンネルの代替設定。
resolution-ribs inet.3を設定する代わりに、トンネルエンドポイントへのルートのプロトコルネクストホップ優先度よりも低いトンネル優先度を設定することができます。R4 のルートは OSPF を使用して学習され、優先度は 10、トンネルのデフォルト優先度は 305 です。トンネル優先度を OSPF 優先度よりも低く設定すると、トンネルを優先して確立できます。[edit] user@R2# set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.2 user@R2# set routing-options dynamic-tunnels Tunnel-01 ipip user@R2# set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 preference 9
-
R2の設定モードから
commitを入力します。
R3 の手順
-
R3で設定モードにします。
-
R2、R4、およびインターフェイスlo0に接続されたインターフェイスを設定します。
[edit] user@R3# set interfaces xe-0/2/0 unit 0 description R3-to-R2 user@R3# set interfaces xe-0/2/0 unit 0 family inet address 10.1.23.2/30 user@R3# set interfaces xe-0/2/1 unit 0 description R3-to-R4 user@R3# set interfaces xe-0/2/1 unit 0 family inet address 10.1.34.1/30 user@R3# set interfaces lo0 unit 0 family inet address 10.1.255.3/32
-
ルーターIDを設定します。
[edit] user@R3# set routing-options router-id 10.1.255.3
-
OSPF プロトコルを R2 および R4 に接続して、lo0 到達可能性を実現するように設定します。
[edit] user@R3# set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 user@R3# set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 user@R3# set protocols ospf area 0.0.0.0 interface lo0.0 passive
-
R3デバイスの設定モードから
commitを入力します。
結果
以下のようにデバイスから以下の設定を確認して、設定を検証します。
R2 での設定を検証する方法は次のとおりです。
user@R2# show interfaces
xe-0/2/0 {
description R2-to-R1;
unit 0 {
family inet {
address 192.168.12.2/30;
}
family iso;
}
}
xe-0/2/1 {
description R2-to-R3;
unit 0 {
family inet {
address 10.1.23.1/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.1.255.2/32;
}
family iso {
address 49.0001.0010.1255.0002.00;
}
}
}
user@R2# show routing-options
resolution {
rib inet.0 {
resolution-ribs inet.3;
}
}
router-id 10.1.255.2;
autonomous-system 65000;
dynamic-tunnels {
Tunnel-01 {
source-address 10.1.255.2;
ipip;
destination-networks {
10.1.255.0/24;
}
}
}
user@R2# show protocols
bgp {
group iBGP {
type internal;
local-address 10.1.255.2;
family inet {
unicast;
}
export export-isis;
neighbor 10.1.255.4;
}
}
isis {
interface xe-0/2/0.0;
interface lo0.0;
level 1 disable;
export export-bgp;
}
ospf {
area 0.0.0.0 {
interface xe-0/2/1.0;
interface lo0.0;
}
}
user@R2# show policy-options
policy-statement export-bgp {
term t1 {
from protocol bgp;
then accept;
}
}
policy-statement export-isis {
term t1 {
from protocol isis;
then {
next-hop self;
accept;
}
}
}
検証
動的トンネルデータベースの検証
目的
動的トンネルデータベース情報を確認するには、 show dynamic-tunnels database 運用モードコマンドを使用します。
アクション
user@R2> show dynamic-tunnels database
*- Signal Tunnels #- PFE-down
Table: inet.3
Destination-network: 10.1.255.0/24
Tunnel to: 10.1.255.4/32
Reference count: 3
Next-hop type: IPoIP (forwarding-nexthop)
Source address: 10.1.255.2
Next hop: tunnel-composite, 0x76b6c50, nhid 515
Reference count: 2
Ingress Route: [OSPF] 10.1.255.4/32, via metric 2
Traffic Statistics: Packets 0, Bytes 0
State: Up
Aggregate Traffic Statistics:
Tunnel Encapsulation: Dest 10.1.255.4, Src 10.1.255.2, IPoIP, Tunnel-Id 1
Traffic Statistics: Packets 0, Bytes 0
user@R4> show dynamic-tunnels database
*- Signal Tunnels #- PFE-down
Table: inet.3
Destination-network: 10.1.255.0/24
Tunnel to: 10.1.255.2/32
Reference count: 3
Next-hop type: IPoIP (forwarding-nexthop)
Source address: 10.1.255.4
Next hop: tunnel-composite, 0x76b6c50, nhid 513
Reference count: 2
Ingress Route: [OSPF] 10.1.255.2/32, via metric 2
Traffic Statistics: Packets 0, Bytes 0
State: Up
Aggregate Traffic Statistics:
Tunnel Encapsulation: Dest 10.1.255.2, Src 10.1.255.4, IPoIP, Tunnel-Id 1
Traffic Statistics: Packets 0, Bytes 0
意味
この出力は、R2(192.168.0.21 送信元)とR4(192.168.0.41 宛先)の間にIPoIPトンネルが確立され、R4(送信元192.168.0.41 )とR2(宛先192.168.0.21 )の間に別のIPoIPトンネルが確立されていることを示しています。
inet.3でルートテーブルを検証する
目的
inet.3テーブルで生成されたルートを検証するには、 show route table inet.3 運用モードコマンドを使用します。
アクション
user@R2> show route table inet.3
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.255.0/24 *[Tunnel/305] 02:02:44
Tunnel
10.1.255.4/32 *[Tunnel/305] 02:02:44, metric 2
Tunnel Composite, IPoIP (src 10.1.255.2 dest 10.1.255.4)
user@R4> show route table inet.3
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.255.0/24 *[Tunnel/305] 6d 01:35:50
Tunnel
10.1.255.2/32 *[Tunnel/305] 6d 01:35:48, metric 2
Tunnel Composite, IPoIP (src 10.1.255.4 dest 10.1.255.2)
意味
出力は、トンネルを使用する BGP トラフィックの解決に使用されるルートを示しています。
トンネルを使用した BGP ルートの検証
目的
R2 および R4 で受信した R1 および R5 用の BGP ルートがトンネルを使用していることを確認するには。
アクション
user@R2> show route protocol bgp
inet.0: 17 destinations, 17 routes (17 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.255.5/32 *[BGP/170] 02:42:48, MED 10, localpref 100, from 10.1.255.4
AS path: I, validation-state: unverified
> via Tunnel Composite, IPoIP (src 10.1.255.2 dest 10.1.255.4)
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
user@R4> show route protocol bgp
inet.0: 17 destinations, 17 routes (17 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.255.1/32 *[BGP/170] 00:13:30, MED 10, localpref 100, from 10.1.255.2
AS path: I, validation-state: unverified
> via Tunnel Composite, IPoIP (src 10.1.255.4 dest 10.1.255.2)
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
意味
出力は、R2 が R5 への BGP ルートにトンネルを使用し、R4 が R1 への BGP ルートにトンネルを使用していることを示しています。
エンドツーエンドの到達可能性を検証
目的
ping 192.168.255.5 source 192.168.255.1 count 2運用モードコマンドを使用して、R1がR5にpingを実行できることを確認します。
アクション
user@R1>ping 192.168.255.5 source 192.168.255.1 count 2
PING 192.168.255.5 (192.168.255.5): 56 data bytes
64 bytes from 192.168.255.5: icmp_seq=0 ttl=62 time=5.565 ms
64 bytes from 192.168.255.5: icmp_seq=1 ttl=62 time=5.957 ms
--- 192.168.255.5 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 5.565/5.761/5.957/0.196 ms
意味
R1からの出力は、R1がR5にpingを実行できることを示しています。
例:静的設定を使用した inetcolor.0 を介して解決される LDP トンネルを使用した MPLS 環境での IPoIP トンネルの設定
デフォルトでは、MPLS は IP よりも優先度が高くなります。例えば、R2、R3、R4の間でMPLSとLDPが設定されており、R2はLDPを介してR4と到達可能であり、R2からのルートは優先度が高いため、IP-over-IPではなくLDPを介して解決されます。
LDPではなくIP-over-IPを介して解決する特定のルートを使用する場合は、IP-over-IPの方が優先度の高いinetcolorテーブルを作成し、inet3テーブルではなくinetcolorテーブル上でそのルートを解決するようにBGPを設定することで解決できます。次の例は、静的設定を使用してこれを行う方法を示しています。
トポロジー
この例では、R2 と R4 の間に確立された IP-over-IP ダイナミック トンネルを介して、R1 から R5 へ、またはその逆のルートを交換しています。プロトコルIS-ISを使用して、R1からのルートはR2にエクスポートされ、R5からのルートはR4にエクスポートされます。R2 から R4 に Tunnel-01 ユニキャスト IPIP トンネルを設定し、R4 から R2 に別の トンネル Tunnel-01 を設定します。ピアデバイスの設定された宛先ネットワークからネットワークマスク内に生成されたルートプレフィックスは、トンネルの作成と、トンネル内のルートの反対方向のトラフィックフローに使用されます。
CLIクイックコンフィグレーション
R1
set interfaces xe-0/2/0 unit 0 description R1-to-R2 set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.1/30 set interfaces xe-0/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.255.1/32 set interfaces lo0 unit 0 family iso address 49.0001.1920.1682.5501.00 set routing-options router-id 192.168.255.1 set protocols isis interface xe-0/2/0.0 set protocols isis interface lo0.0 set protocols isis level 1 disable
R2
set interfaces xe-0/2/0 description R2-to-R1 set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.2/30 set interfaces xe-0/2/0 unit 0 family iso set interfaces xe-0/2/1 description R2-to-R3 set interfaces xe-0/2/1 unit 0 family inet address 10.1.23.1/30 set interfaces xe-0/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.2/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.1255.0002.00 set policy-options policy-statement export-bgp term t1 from protocol bgp set policy-options policy-statement export-bgp term t1 then accept set policy-options policy-statement export-isis term t1 from protocol isis set policy-options policy-statement export-isis term t1 then next-hop self set policy-options policy-statement export-isis term t1 then accept set policy-options policy-statement ipip-tunnel-color term term-01 from route-filter 192.168.255.5/32 exact set policy-options policy-statement ipip-tunnel-color term term-01 then community add red set policy-options policy-statement ipip-tunnel-color term term-01 then accept set policy-options policy-statement set-dynamic-tunnel-ep term t1 from route-filter 10.1.255.4/32 exact set policy-options policy-statement set-dynamic-tunnel-ep term t1 then tunnel-end-point-address 10.1.255.4 set policy-options policy-statement set-dynamic-tunnel-ep term t1 then accept set policy-options community red members color:0:100 set routing-options router-id 10.1.255.2 set routing-options autonomous-system 65000 set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.2 set routing-options dynamic-tunnels Tunnel-01 ipip set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 dyn-tunnel-attribute-policy set-dynamic-tunnel-ep set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 colors 100 set protocols bgp group iBGP type internal set protocols bgp group iBGP local-address 10.1.255.2 set protocols bgp group iBGP import ipip-tunnel-color set protocols bgp group iBGP family inet unicast extended-nexthop-color set protocols bgp group iBGP export export-isis set protocols bgp group iBGP neighbor 10.1.255.4 set protocols isis interface xe-0/2/0.0 set protocols isis interface lo0.0 set protocols isis level 1 disable set protocols isis export export-bgp set protocols ldp interface xe-0/2/1.0 set protocols mpls interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface lo0.0
R3
set interfaces xe-0/2/0 unit 0 description R3-to-R2 set interfaces xe-0/2/0 unit 0 family inet address 10.1.23.2/30 set interfaces xe-0/2/0 unit 0 family mpls set interfaces xe-0/2/1 unit 0 description R3-to-R4 set interfaces xe-0/2/1 unit 0 family inet address 10.1.34.1/30 set interfaces xe-0/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.3/32 set routing-options router-id 10.1.255.3 set protocols ldp interface xe-0/2/0.0 set protocols ldp interface xe-0/2/1.0 set protocols mpls interface xe-0/2/0.0 set protocols mpls interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive
R4
set interfaces xe-0/2/0 unit 0 description R4-to-R3 set interfaces xe-0/2/0 unit 0 family inet address 10.1.34.2/30 set interfaces xe-0/2/0 unit 0 family mpls set interfaces xe-0/2/1 unit 0 description R4-to-R5 set interfaces xe-0/2/1 unit 0 family inet address 192.168.45.1/30 set interfaces xe-0/2/1 unit 0 family iso set interfaces lo0 unit 0 family inet address 10.1.255.4/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.1255.0004.00 set policy-options policy-statement export-bgp term t1 from protocol bgp set policy-options policy-statement export-bgp term t1 then accept set policy-options policy-statement export-isis term t1 from protocol isis set policy-options policy-statement export-isis term t1 then next-hop self set policy-options policy-statement export-isis term t1 then accept set policy-options policy-statement ipip-tunnel-color term term-01 from route-filter 192.168.255.1/32 exact set policy-options policy-statement ipip-tunnel-color term term-01 then community add red set policy-options policy-statement ipip-tunnel-color term term-01 then accept set policy-options policy-statement set-dynamic-tunnel-ep term t1 from route-filter 10.1.255.2/32 exact set policy-options policy-statement set-dynamic-tunnel-ep term t1 then tunnel-end-point-address 10.1.255.2 set policy-options policy-statement set-dynamic-tunnel-ep term t1 then accept set policy-options community red members color:0:100 set routing-options router-id 10.1.255.4 set routing-options autonomous-system 65000 set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.4 set routing-options dynamic-tunnels Tunnel-01 ipip set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 dyn-tunnel-attribute-policy set-dynamic-tunnel-ep set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 colors 100 set protocols bgp group iBGP type internal set protocols bgp group iBGP local-address 10.1.255.4 set protocols bgp group iBGP import ipip-tunnel-color set protocols bgp group iBGP family inet unicast extended-nexthop-color set protocols bgp group iBGP export export-isis set protocols bgp group iBGP neighbor 10.1.255.2 set protocols isis interface xe-0/2/1.0 set protocols isis interface lo0.0 set protocols isis level 1 disable set protocols isis export export-bgp set protocols ldp interface xe-0/2/0.0 set protocols mpls interface xe-0/2/0.0 set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 set protocols ospf area 0.0.0.0 interface lo0.0
R5
set interfaces xe-0/2/0 unit 0 description R5-to-R4 set interfaces xe-0/2/0 unit 0 family inet address 192.168.45.2/30 set interfaces xe-0/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.255.5/32 set interfaces lo0 unit 0 family iso address 49.0001.1920.1682.5505.00 set routing-options router-id 192.168.255.5 set protocols isis interface xe-0/2/0.0 set protocols isis interface lo0.0 set protocols isis level 1 disable
手順
R1 の手順
R1とR5の設定が似ているため、R1の手順のみを順を追って説明します。
-
R1で設定モードにします。
-
R2とインターフェイスlo0に接続されたインターフェイスを設定します。ファミリー
inetとisoの両方を設定してください。プロトコルIS-ISにはファミリーisoが必要です。[edit] user@R1# set interfaces xe-0/2/0 unit 0 description R1-to-R2 user@R1# set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.1/30 user@R1# set interfaces xe-0/2/0 unit 0 family iso user@R1# set interfaces lo0 unit 0 family inet address 192.168.255.1/32 user@R1# set interfaces lo0 unit 0 family iso address 49.0001.1920.1682.5501.00
-
ルーターIDを設定します。
[edit] user@R1# set routing-options router-id 192.168.255.1
-
プロトコル IS-IS を設定します。ルートは、IS-ISプロトコルを使用してR1とR2の間でアドバタイズされます。
[edit] user@R1# set protocols isis interface xe-0/2/0.0 user@R1# set protocols isis interface lo0.0 user@R1# set protocols isis level 1 disable
-
設定モードから R1 の
commitを入力します。
R2 の手順
R2とR4の設定が似ているため、R2の手順のみを順を追って説明します。
-
R2で設定モードにします。
-
R1、R3、およびインターフェイスlo0に接続されたインターフェイスを設定します。R1とlo0に接続されたインターフェイスにはファミリー
inetとisoの両方を設定し、R3に接続されたインターフェイスにはファミリーinetとmplsの両方を設定してください。[edit] user@R2# set interfaces xe-0/2/0 description R2-to-R1 user@R2# set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.2/30 user@R2# set interfaces xe-0/2/0 unit 0 family iso user@R2# set interfaces xe-0/2/1 description R2-to-R3 user@R2# set interfaces xe-0/2/1 unit 0 family inet address 10.1.23.1/30 user@R2# set interfaces xe-0/2/0 unit 0 family mpls user@R2# set interfaces lo0 unit 0 family inet address 10.1.255.2/32 user@R2# set interfaces lo0 unit 0 family iso address 49.0001.0010.1255.0002.00
-
R1に接続されたインターフェイスのプロトコルIS-ISを設定します。BGPルートをIS-ISにアドバタイズするためのエクスポートポリシーは、ポリシー設定ステップで示されています。
[edit] user@R2# set protocols isis interface xe-0/2/0.0 user@R2# set protocols isis interface lo0.0 user@R2# set protocols isis level 1 disable user@R2# set protocols isis export export-bgp
-
lo0到達可能性を得るために、R3に接続されたインターフェイスのOSPFプロトコルを設定します。
[edit] user@R2# set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 user@R2# set protocols ospf area 0.0.0.0 interface lo0.0
-
R3に接続するインターフェイスのLDPおよびMPLSプロトコルを設定します。
[edit] user@R2# set protocols ldp interface xe-0/2/1.0 user@R2# set protocols mpls interface xe-0/2/1.0
-
routing-options階層下のrouter-idとautonomous-systemを設定し、R2とR4の間でIBGPを設定します。ポリシー設定ステップでは、BGPを使用して学習したルートにコミュニティを追加するインポートポリシーと、IS-ISルートをBGPにアドバタイズするためのエクスポートポリシーを示しています。inetcolor.0テーブルを使用して解決できるようにextended-nexthop-colorオプションをfamily inet unicast設定に含めるようにしてください。[edit] user@R2# set routing-options router-id 10.1.255.2 user@R2# set routing-options autonomous-system 65000 user@R2# set protocols bgp group iBGP type internal user@R2# set protocols bgp group iBGP local-address 10.1.255.2 user@R2# set protocols bgp group iBGP import ipip-tunnel-color user@R2# set protocols bgp group iBGP family inet unicast extended-nexthop-color user@R2# set protocols bgp group iBGP export export-isis user@R2# set protocols bgp group iBGP neighbor 10.1.255.4
-
R2 から R4 への IP-IP ダイナミック トンネル Tunnel-01 を設定します。
colors設定オプションを使用すると、inetcolor.0ルートテーブルにトンネルを作成できます。このdyn-tunnel-attribute-policyset-dynamic-tunnel-ep は、静的なトンネルエンドポイントを設定します。ポリシーは、ポリシー設定ステップとともに表示されます。[edit] user@R2# set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.2 user@R2# set routing-options dynamic-tunnels Tunnel-01 ipip user@R2# set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 dyn-tunnel-attribute-policy set-dynamic-tunnel-ep user@R2# set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 colors 100
-
前の構成手順で適用されたポリシーを構成します。 export-bgp ポリシーは、BGPルートをIS-ISにアドバタイズします。 export-isis ポリシーは、ネクストホップをR2に変更することで、IS-ISルートをBGPにアドバタイズします。 ipip-tunnel-color ポリシーは、動的トンネルの
colors設定で一致するルートにコミュニティを適用します。 set-dynamic-tunnel-ep ポリシーは、R4をトンネルエンドポイントとして設定します。[edit] user@R2# set policy-options policy-statement export-bgp term t1 from protocol bgp user@R2# set policy-options policy-statement export-bgp term t1 then accept user@R2# set policy-options policy-statement export-isis term t1 from protocol isis user@R2# set policy-options policy-statement export-isis term t1 then next-hop self user@R2# set policy-options policy-statement export-isis term t1 then accept user@R2# set policy-options policy-statement ipip-tunnel-color term term-01 from route-filter 192.168.255.5/32 exact user@R2# set policy-options policy-statement ipip-tunnel-color term term-01 then community add red user@R2# set policy-options policy-statement ipip-tunnel-color term term-01 then accept user@R2# set policy-options policy-statement set-dynamic-tunnel-ep term t1 from route-filter 10.1.255.4/32 exact user@R2# set policy-options policy-statement set-dynamic-tunnel-ep term t1 then tunnel-end-point-address 10.1.255.4 user@R2# set policy-options policy-statement set-dynamic-tunnel-ep term t1 then accept user@R2# set policy-options community red members color:0:100
-
設定モードから
commitを入力します。
R3 の手順
-
R3で設定モードにします。
-
R2、R4、およびインターフェイスlo0に接続されたインターフェイスを設定します。R2およびR4に接続されたインターフェイスでは、ファミリー
inetとmplsの両方を設定してください。[edit] user@R3# set interfaces xe-0/2/0 unit 0 description R3-to-R2 user@R3# set interfaces xe-0/2/0 unit 0 family inet address 10.1.23.2/30 user@R3# set interfaces xe-0/2/0 unit 0 family mpls user@R3# set interfaces xe-0/2/1 unit 0 description R3-to-R4 user@R3# set interfaces xe-0/2/1 unit 0 family inet address 10.1.34.1/30 user@R3# set interfaces xe-0/2/1 unit 0 family mpls user@R3# set interfaces lo0 unit 0 family inet address 10.1.255.3/32
-
ルーターIDを設定します。
[edit] user@R3# set routing-options router-id 10.1.255.3
-
OSPF プロトコルを R2 および R4 に接続して、lo0 到達可能性を実現するように設定します。
[edit] user@R3# set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 user@R3# set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 user@R3# set protocols ospf area 0.0.0.0 interface lo0.0 passive
-
R2およびR4に接続するインターフェイスのLDPおよびMPLSプロトコルを設定します。
[edit] user@R2# set protocols ldp interface xe-0/2/0.0 user@R2# set protocols ldp interface xe-0/2/1.0 user@R2# set protocols mpls interface xe-0/2/0.0 user@R2# set protocols mpls interface xe-0/2/1.0
-
R3デバイスのコンフィギュレーションモードから
commitに入ります。
結果
デバイスから以下の設定を確認して、設定を検証します。
R2 の設定を確認する方法は次のとおりです。
user@R2# show interfaces
xe-0/2/0 {
description R2-to-R1;
unit 0 {
family inet {
address 192.168.12.2/30;
}
family iso;
}
}
xe-0/2/1 {
description R2-to-R3;
unit 0 {
family inet {
address 10.1.23.1/30;
}
family mpls;
}
}
lo0 {
apply-groups-except global;
unit 0 {
family inet {
address 10.1.255.2/32;
}
family iso {
address 49.0001.0010.1255.0002.00;
}
}
}
user@R2# show protocols
bgp {
group iBGP {
type internal;
local-address 10.1.255.2;
import ipip-tunnel-color;
family inet {
unicast {
extended-nexthop-color;
}
}
export export-isis;
neighbor 10.1.255.4;
}
}
isis {
interface xe-0/2/0.0;
interface lo0.0;
level 1 disable;
export export-bgp;
}
ldp {
interface xe-0/2/1.0;
}
mpls {
interface xe-0/2/1.0;
}
ospf {
area 0.0.0.0 {
interface xe-0/2/1.0;
interface lo0.0;
}
}
user@R2#show routing-options
router-id 10.1.255.2;
autonomous-system 65000;
dynamic-tunnels {
Tunnel-01 {
source-address 10.1.255.2;
ipip;
destination-networks {
10.1.255.0/24 {
dyn-tunnel-attribute-policy set-dynamic-tunnel-ep;
colors 100;
}
}
}
}
user@R2#show policy-options
policy-statement export-bgp {
term t1 {
from protocol bgp;
then accept;
}
}
policy-statement export-isis {
term t1 {
from protocol isis;
then {
next-hop self;
accept;
}
}
}
policy-statement ipip-tunnel-color {
term term-01 {
from {
route-filter 192.168.255.5/32 exact;
}
then {
community add red;
accept;
}
}
}
policy-statement set-dynamic-tunnel-ep {
term t1 {
from {
route-filter 10.1.255.4/32 exact;
}
then {
tunnel-end-point-address 10.1.255.4;
accept;
}
}
}
community red members color:0:100;
検証
ルート解決の検証
目的
inet.3テーブルとinetcolor.0テーブルの両方のルートのルート解決を検証するには、 show route table inet.3 および show route table inetcolor.0 動作モードコマンドを使用します。
アクション
user@R2> show route table inet.3
inet.3: 3 destinations, 4 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.255.0/24 *[Tunnel/305] 00:12:21
Tunnel
10.1.255.3/32 *[LDP/9] 1d 19:37:01, metric 1
> to 10.1.23.2 via xe-0/2/1.0
10.1.255.4/32 *[LDP/9] 1d 19:32:25, metric 1
> to 10.1.23.2 via xe-0/2/1.0, Push 299792
[Tunnel/305] 00:13:38, metric 2
Tunnel Composite, IPoIP (src 10.1.255.2 dest 10.1.255.4)
user@R2> show route table inetcolor.0
inetcolor.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.255.0-0<c>/24
*[Tunnel/305] 00:13:26
Tunnel
10.1.255.4-100<c>/64
*[Tunnel/305] 00:13:26, metric 2
Tunnel Composite, IPoIP (src 10.1.255.2 dest 10.1.255.4-100<c>)
意味
R2の出力は、inet.3テーブルでは、IP-over-IPよりも優先度が高いため、ルート10.1.255.4がLDPによって解決されていることを示しています。一方、新しく作成されたinetcolor.0テーブルでは、<c>が接続されたIP-over-IPトンネルを介してルート10.1.255.4が解決されています。
動的トンネルデータベースの検証
目的
inetcolor.0テーブル内のルートによって作成されたIP-over-IP動的トンネルを確認するには、 show dynamic-tunnels database terse 動作モードコマンドを使用します。
アクション
user@R2>show dynamic-tunnels database terse
*- Signal Tunnels #- PFE-down
Table: inet.3
Destination-network: 10.1.255.0/24
*- Signal Tunnels #- PFE-down
Table: inetcolor.0
Destination-network: 10.1.255.0-0<c>/24
Destination Source Next-hop Type Status
10.1.255.4-100<c>/64 10.1.255.2 0x76b71cc nhid 592 IPoIP Up (via metric 2, tunnel-endpoint 10.1.255.4)
意味
R2 の出力は、ルート 192.168.0.41 がネクストホップベースの動的トンネル作成したことを示しています。
ルートネクストホップの検証
目的
IP-over-IP経由で解決するように設定されたルートのすべてのネクストホップを確認するには、 show route 192.168.255.5 extensive expanded-nh 動作モードコマンドを使用します。
アクション
user@R2>show route 192.168.255.5 extensive expanded-nh
inet.0: 18 destinations, 18 routes (18 active, 0 holddown, 0 hidden)
192.168.255.5/32 (1 entry, 1 announced)
Installed-nexthop:
Indr Composite (0x76b7238) 10.1.255.4-100<c>
Krt_cnh (0x6fb1928) Index:593
Krt_inh (0x7164d3c) Index:1048575 PNH: 10.1.255.4-100<c>
Tun-comp (0x76b71cc) Index:592 IPoIP src 10.1.255.2 dest 10.1.255.4-100<c> tunnel-endpoint 10.1.255.4
TSI:
KRT in-kernel 192.168.255.5/32 -> {composite(593)}
IS-IS level 2, LSP fragment 0
*BGP Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0x76b7238
Next-hop reference count: 2
Source: 10.1.255.4
Next hop type: Tunnel Composite, Next hop index: 592
Next hop: via Tunnel Composite, IPoIP (src 10.1.255.2 dest 10.1.255.4-100<c> tunnel-endpoint 10.1.255.4), selected
Protocol next hop: 10.1.255.4-100<c>
Composite next hop: 0x6fb1928 593 INH Session ID: 0
Indirect next hop: 0x7164d3c 1048575 INH Session ID: 0
State: <Active Int Ext>
Local AS: 65000 Peer AS: 65000
Age: 20:14 Metric: 10 Metric2: 2
Validation State: unverified
Task: BGP_65000.10.1.255.4
Announcement bits (2): 0-KRT 5-IS-IS
AS path: I
Communities: color:0:100
Accepted
Localpref: 100
Router ID: 10.1.255.4
Route-nexthop:
Indr (0x76b7238) 10.1.255.4-100<c>
Krt_cnh (0x6fb1928) Index:593
Krt_inh (0x7164d3c) Index:1048575
Tun-comp (0x76b71cc) Index:592
Thread: junos-main
Composite next hops: 1
Protocol next hop: 10.1.255.4-100<c> Metric: 2
Composite next hop: 0x6fb1928 593 INH Session ID: 0
Indirect next hop: 0x7164d3c 1048575 INH Session ID: 0
Indirect path forwarding next hops: 1
Next hop type: Tunnel Composite
Tunnel type: IPoIP, (forwarding-nexthop), Reference count: 2, nhid: 592
Destination address: 10.1.255.4-100<c>, Source address: 10.1.255.2
Tunnel endpoint: 10.1.255.4
10.1.255.4-100<c>/64 Originating RIB: inetcolor.0
Metric: 2 Node path count: 1
Forwarding nexthops: 1
Next hop type: Tunnel Composite
Tunnel type: IPoIP, (extended-attr), Reference count: 1, nhid: 0
Destination address: 10.1.255.4-100<c>, Source address: 10.1.255.2
意味
R2からの出力は、 192.168.255.5 ルートの拡張ネクストホップを示しています。R2はMXシリーズルーターのため、プロトコルネクストホップと間接ネクストホップを送信します。
エンドツーエンドの到達可能性を検証
目的
ping 192.168.255.5 source 192.168.255.1 count 2運用モードコマンドを使用して、R1がR5にpingを実行できることを確認します。
アクション
user@R1>ping 192.168.255.5 source 192.168.255.1 count 2
PING 192.168.255.5 (192.168.255.5): 56 data bytes
64 bytes from 192.168.255.5: icmp_seq=0 ttl=62 time=6.009 ms
64 bytes from 192.168.255.5: icmp_seq=1 ttl=62 time=5.398 ms
--- 192.168.255.5 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 5.398/5.704/6.009/0.306 ms
意味
R1からの出力は、R1がR5にpingを実行できることを示しています。
例:MPLSクラウドでLDPトンネルを使用したIPoIPトンネルを設定する、BGPシグナリングを使用してinetcolor.0で解決
LDP が有効な MPLS 環境では、MPLS の方が IP よりも優先度が高いため、BGP ルートは inet.3 テーブル上の LDP を介して解決されます。
それでも MPLS 環境で IP-over-IP を介してルートを解決してもらいたい場合は、IP-over-IP により高い優先度を割り当て、IP-over-IP を介して選択したルートを解決する inetcolor.0 テーブルを作成することで、それを実現できます。BGPを使用してこの機能を有効にするには、トンネルのリモートエンドデバイスでルート解決を実行し、リモートデバイスで設定されたエクスポートポリシーを使用して、BGPシグナリングを介してルートを受信およびアドバタイズします。この例では、BGPプロトコル設定を使用してこれを設定する方法を示しています。
この例では、R2 と R4 の間に確立された IP-over-IP ダイナミック トンネルを介して、R1 から R5 へ、またはその逆のルートを交換しています。プロトコルIS-ISを使用して、R1からのルートはR2にエクスポートされ、R5からのルートはR4にエクスポートされます。R2 から R4 に Tunnel-01 ユニキャスト IPIP トンネルを設定し、R4 から R2 に別の トンネル Tunnel-01 を設定します。ピアデバイスの設定された宛先ネットワークからネットワークマスク内に生成されたルートプレフィックスは、トンネルの作成と、トンネル内のルートの反対方向のトラフィックフローに使用されます。
CLIクイックコンフィグレーション
R1
set interfaces xe-0/2/0 unit 0 description R1-to-R2 set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.1/30 set interfaces xe-0/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.255.1/32 set interfaces lo0 unit 0 family iso address 49.0001.1920.1682.5501.00 set routing-options router-id 192.168.255.1 set protocols isis interface xe-0/2/0.0 set protocols isis interface lo0.0 set protocols isis level 1 disable
R2
set interfaces xe-0/2/0 description R2-to-R1 set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.2/30 set interfaces xe-0/2/0 unit 0 family iso set interfaces xe-0/2/1 description R2-to-R3 set interfaces xe-0/2/1 unit 0 family inet address 10.1.23.1/30 set interfaces xe-0/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.2/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.1255.0002.00 set policy-options policy-statement export-bgp term t1 from protocol bgp set policy-options policy-statement export-bgp term t1 then accept set policy-options policy-statement export-tunnel-route term t1 from route-filter 192.168.255.1/32 exact set policy-options policy-statement export-tunnel-route term t1 then tunnel-attribute set tunnel-attr-01 set policy-options policy-statement export-tunnel-route term t1 then next-hop self set policy-options policy-statement export-tunnel-route term t1 then accept set policy-options tunnel-attribute tunnel-attr-01 tunnel-type ipip set policy-options tunnel-attribute tunnel-attr-01 tunnel-color 100 set policy-options tunnel-attribute tunnel-attr-01 remote-end-point 10.1.255.4 set routing-options router-id 10.1.255.2 set routing-options autonomous-system 65000 set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.2 set routing-options dynamic-tunnels Tunnel-01 bgp-signal set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 colors 100 set protocols bgp group iBGP type internal set protocols bgp group iBGP local-address 10.1.255.2 set protocols bgp group iBGP family inet unicast extended-nexthop-tunnel set protocols bgp group iBGP export export-tunnel-route set protocols bgp group iBGP neighbor 10.1.255.4 set protocols isis interface xe-0/2/0.0 set protocols isis interface lo0.0 set protocols isis level 1 disable set protocols isis export export-bgp set protocols ldp interface xe-0/2/1.0 set protocols mpls interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface lo0.0
R3
set interfaces xe-0/2/0 unit 0 description R3-to-R2 set interfaces xe-0/2/0 unit 0 family inet address 10.1.23.2/30 set interfaces xe-0/2/0 unit 0 family mpls set interfaces xe-0/2/1 unit 0 description R3-to-R4 set interfaces xe-0/2/1 unit 0 family inet address 10.1.34.1/30 set interfaces xe-0/2/1 unit 0 family mpls set interfaces lo0 unit 0 family inet address 10.1.255.3/32 set routing-options router-id 10.1.255.3 set protocols ldp interface xe-0/2/0.0 set protocols ldp interface xe-0/2/1.0 set protocols mpls interface xe-0/2/0.0 set protocols mpls interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive
R4
set interfaces xe-0/2/0 unit 0 description R4-to-R3 set interfaces xe-0/2/0 unit 0 family inet address 10.1.34.2/30 set interfaces xe-0/2/0 unit 0 family mpls set interfaces xe-0/2/1 unit 0 description R4-to-R5 set interfaces xe-0/2/1 unit 0 family inet address 192.168.45.1/30 set interfaces xe-0/2/1 unit 0 family iso set interfaces lo0 unit 0 family inet address 10.1.255.4/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.1255.0004.00 set policy-options policy-statement export-bgp term t1 from protocol bgp set policy-options policy-statement export-bgp term t1 then accept set policy-options policy-statement export-tunnel-route term t1 from route-filter 192.168.255.5/32 exact set policy-options policy-statement export-tunnel-route term t1 then tunnel-attribute set tunnel-attr-01 set policy-options policy-statement export-tunnel-route term t1 then next-hop self set policy-options policy-statement export-tunnel-route term t1 then accept set policy-options tunnel-attribute tunnel-attr-01 tunnel-type ipip set policy-options tunnel-attribute tunnel-attr-01 tunnel-color 100 set policy-options tunnel-attribute tunnel-attr-01 remote-end-point 10.1.255.2 set routing-options router-id 10.1.255.4 set routing-options autonomous-system 65000 set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.4 set routing-options dynamic-tunnels Tunnel-01 bgp-signal set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 colors 100 set protocols bgp group iBGP type internal set protocols bgp group iBGP local-address 10.1.255.4 set protocols bgp group iBGP family inet unicast extended-nexthop-tunnel set protocols bgp group iBGP export export-tunnel-route set protocols bgp group iBGP neighbor 10.1.255.2 set protocols isis interface xe-0/2/1.0 set protocols isis interface lo0.0 set protocols isis level 1 disable set protocols isis export export-bgp set protocols ldp interface xe-0/2/0.0 set protocols mpls interface xe-0/2/0.0 set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 set protocols ospf area 0.0.0.0 interface lo0.0
R5
set interfaces xe-0/2/0 unit 0 description R5-to-R4 set interfaces xe-0/2/0 unit 0 family inet address 192.168.45.2/30 set interfaces xe-0/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.255.5/32 set interfaces lo0 unit 0 family iso address 49.0001.1920.1682.5505.00 set routing-options router-id 192.168.255.5 set protocols isis interface xe-0/2/0.0 set protocols isis interface lo0.0 set protocols isis level 1 disable
手順
R1 の手順
R1とR5の設定が似ているため、R1の手順のみを順を追って説明します。
-
R1で設定モードにします。
-
R2とインターフェイスlo0に接続されたインターフェイスを設定します。ファミリー
inetとisoの両方を設定してください。プロトコルIS-ISにはファミリーisoが必要です。[edit] user@R1# set interfaces xe-0/2/0 unit 0 description R1-to-R2 user@R1# set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.1/30 user@R1# set interfaces xe-0/2/0 unit 0 family iso user@R1# set interfaces lo0 unit 0 family inet address 192.168.255.1/32 user@R1# set interfaces lo0 unit 0 family iso address 49.0001.1920.1682.5501.00
-
ルーターIDを設定します。
[edit] user@R1# set routing-options router-id 192.168.255.1
-
プロトコル IS-IS を設定します。ルートは、IS-ISプロトコルを使用してR1とR2の間でアドバタイズされます。
[edit] user@R1# set protocols isis interface xe-0/2/0.0 user@R1# set protocols isis interface lo0.0 user@R1# set protocols isis level 1 disable
-
設定モードから R1 の
commitを入力します。
R2 の手順
R2とR4の設定が似ているため、R2の手順のみを順を追って説明します。
-
R2で設定モードにします。
-
R1、R3、およびインターフェイスlo0に接続されたインターフェイスを設定します。R1とlo0に接続されたインターフェイスにはファミリー
inetとisoの両方を設定し、R3に接続されたインターフェイスにはファミリーinetとmplsの両方を設定してください。[edit] user@R2# set interfaces xe-0/2/0 description R2-to-R1 user@R2# set interfaces xe-0/2/0 unit 0 family inet address 192.168.12.2/30 user@R2# set interfaces xe-0/2/0 unit 0 family iso user@R2# set interfaces xe-0/2/1 description R2-to-R3 user@R2# set interfaces xe-0/2/1 unit 0 family inet address 10.1.23.1/30 user@R2# set interfaces xe-0/2/0 unit 0 family mpls user@R2# set interfaces lo0 unit 0 family inet address 10.1.255.2/32 user@R2# set interfaces lo0 unit 0 family iso address 49.0001.0010.1255.0002.00
-
R1に接続されたインターフェイスのプロトコルIS-ISを設定します。BGPルートをIS-ISにアドバタイズするためのエクスポートポリシーは、ポリシー設定ステップで示されています。
[edit] user@R2# set protocols isis interface xe-0/2/0.0 user@R2# set protocols isis interface lo0.0 user@R2# set protocols isis level 1 disable user@R2# set protocols isis export export-bgp
-
lo0到達可能性を得るために、R3に接続されたインターフェイスのOSPFプロトコルを設定します。
[edit] user@R2# set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 user@R2# set protocols ospf area 0.0.0.0 interface lo0.0
-
R3に接続するインターフェイスのLDPおよびMPLSプロトコルを設定します。
[edit] user@R2# set protocols ldp interface xe-0/2/1.0 user@R2# set protocols mpls interface xe-0/2/1.0
-
routing-options階層下のrouter-idとautonomous-systemを設定し、R2とR4の間でIBGPを設定します。ポリシー設定ステップでは、BGPを使用して学習したルートにコミュニティを追加するインポートポリシーと、IS-ISルートをBGPにアドバタイズしてトンネル属性を設定するエクスポートポリシーを示しています。inetcolor.0テーブルを使用して解決できるように、family inet unicast設定にextended-nexthop-tunnelオプションを含めるようにしてください。[edit] user@R2# set routing-options router-id 10.1.255.2 user@R2# set routing-options autonomous-system 65000 user@R2# set protocols bgp group iBGP type internal user@R2# set protocols bgp group iBGP local-address 10.1.255.2 user@R2# set protocols bgp group iBGP family inet unicast extended-nexthop-tunnel user@R2# set protocols bgp group iBGP export export-tunnel-route user@R2# set protocols bgp group iBGP neighbor 10.1.255.4
-
R2でルーティングオプションを設定して、R2からR4へのトンネルを作成します。
bgp-signalオプションは、BGPによってシグナリングされたトンネル作成を有効にします。colors設定オプションを使用すると、inetcolor.0ルートテーブルにトンネルを作成できます。[edit] user@R2# set routing-options dynamic-tunnels Tunnel-01 source-address 10.1.255.2 user@R2# set routing-options dynamic-tunnels Tunnel-01 bgp-signal user@R2# set routing-options dynamic-tunnels Tunnel-01 destination-networks 10.1.255.0/24 colors 100
-
前の構成手順で適用されたポリシーを構成します。export-bgpポリシーは、BGPルートをIS-ISにアドバタイズします。export-tunnel-routeポリシーは、R1からBGPにIS-ISルートを
tunnel-attributeでアドバタイズし、ネクストホップをR2に変更します。tunnel-attr-01tunnel-attributeは、動的トンネルのcolors設定でオンのtunnel-type、トンネルエンドポイント、および一致する色を設定します。[edit] user@R2# set policy-options policy-statement export-bgp term t1 from protocol bgp user@R2# set policy-options policy-statement export-bgp term t1 then accept user@R2# set policy-options policy-statement export-tunnel-route term t1 from route-filter 192.168.255.1/32 exact user@R2# set policy-options policy-statement export-tunnel-route term t1 then tunnel-attribute set tunnel-attr-01 user@R2# set policy-options policy-statement export-tunnel-route term t1 then next-hop self user@R2# set policy-options policy-statement export-tunnel-route term t1 then accept user@R2# set policy-options tunnel-attribute tunnel-attr-01 tunnel-type ipip user@R2# set policy-options tunnel-attribute tunnel-attr-01 tunnel-color 100 user@R2# set policy-options tunnel-attribute tunnel-attr-01 remote-end-point 10.1.255.4
-
設定モードから
commitを入力します。
R3 の手順
-
R3で設定モードにします。
-
R2、R4、およびインターフェイスlo0に接続されたインターフェイスを設定します。R2およびR4に接続されたインターフェイスでは、ファミリー
inetとmplsの両方を設定してください。[edit] user@R3# set interfaces xe-0/2/0 unit 0 description R3-to-R2 user@R3# set interfaces xe-0/2/0 unit 0 family inet address 10.1.23.2/30 user@R3# set interfaces xe-0/2/0 unit 0 family mpls user@R3# set interfaces xe-0/2/1 unit 0 description R3-to-R4 user@R3# set interfaces xe-0/2/1 unit 0 family inet address 10.1.34.1/30 user@R3# set interfaces xe-0/2/1 unit 0 family mpls user@R3# set interfaces lo0 unit 0 family inet address 10.1.255.3/32
-
ルーターIDを設定します。
[edit] user@R3# set routing-options router-id 10.1.255.3
-
OSPF プロトコルを R2 および R4 に接続して、lo0 到達可能性を実現するように設定します。
[edit] user@R3# set protocols ospf area 0.0.0.0 interface xe-0/2/0.0 user@R3# set protocols ospf area 0.0.0.0 interface xe-0/2/1.0 user@R3# set protocols ospf area 0.0.0.0 interface lo0.0 passive
-
R2およびR4に接続するインターフェイスのLDPおよびMPLSプロトコルを設定します。
[edit] user@R2# set protocols ldp interface xe-0/2/0.0 user@R2# set protocols ldp interface xe-0/2/1.0 user@R2# set protocols mpls interface xe-0/2/0.0 user@R2# set protocols mpls interface xe-0/2/1.0
-
R3デバイスのコンフィギュレーションモードから
commitに入ります。
結果
設定モードから次のshowコマンドを使用して、設定を確認できます。
R2デバイスでの設定を確認する方法は次のとおりです。
user@R2# show interfaces
xe-0/2/0 {
description R2-to-R1;
unit 0 {
family inet {
address 192.168.12.2/30;
}
family iso;
}
}
xe-0/2/1 {
description R2-to-R3;
unit 0 {
family inet {
address 10.1.23.1/30;
}
family mpls;
}
}
lo0 {
apply-groups-except global;
unit 0 {
family inet {
address 10.1.255.2/32;
}
family iso {
address 49.0001.0010.1255.0002.00;
}
}
}
user@R2# show protocols
bgp {
group iBGP {
type internal;
local-address 10.1.255.2;
family inet {
unicast {
extended-nexthop-tunnel;
}
}
export export-tunnel-route;
neighbor 10.1.255.4;
}
}
isis {
interface xe-0/2/0.0;
interface lo0.0;
level 1 disable;
export export-bgp;
}
ldp {
interface xe-0/2/1.0;
}
mpls {
interface xe-0/2/1.0;
}
ospf {
area 0.0.0.0 {
interface xe-0/2/1.0;
interface lo0.0;
}
}
user@R2# show routing-options
router-id 10.1.255.2;
autonomous-system 65000;
dynamic-tunnels {
Tunnel-01 {
source-address 10.1.255.2;
bgp-signal;
destination-networks {
10.1.255.0/24 colors 100;
}
}
}
user@R2# show policy-options
policy-statement export-bgp {
term t1 {
from protocol bgp;
then accept;
}
}
policy-statement export-tunnel-route {
term t1 {
from {
route-filter 192.168.255.1/32 exact;
}
then {
tunnel-attribute set tunnel-attr-01;
next-hop self;
accept;
}
}
}
tunnel-attribute tunnel-attr-01 {
tunnel-type ipip;
tunnel-color 100;
remote-end-point 10.1.255.4;
}
検証
BGPルートの検証
目的
BGPプロトコルを使用して送信されたルートを確認します。
アクション
R2
user@R2> show route protocol bgp
inet.0: 18 destinations, 18 routes (18 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.255.5/32 *[BGP/170] 01:21:51, MED 10, localpref 100, from 10.1.255.4
AS path: I, validation-state: unverified
> via Tunnel Composite, IPoIP (src 10.1.255.2 dest 10.1.255.4-100<c> tunnel-endpoint 10.1.255.2)
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
mpls.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
inetcolor.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
意味
出力は、BGPからのルートを示しています。
受信したルートの検証
目的
以下の動作モードコマンドを使用して、BGP経由で受信したルートを確認します。
アクション
R2
user@R2> show route receive-protocol bgp 10.1.255.4 192.168.255.5 extensive
inet.0: 18 destinations, 18 routes (18 active, 0 holddown, 0 hidden)
* 192.168.255.5/32 (1 entry, 1 announced)
Accepted
Nexthop: 10.1.255.4
MED: 10
Localpref: 100
AS path: I
Tunnel type: ipip, Tunnel color: 100, Remote end point: 10.1.255.2
意味
R2 出力は、デバイスで受信したルートを示しています。
動的トンネルの検証
目的
動的トンネルが稼働しており、BGP がシグナリングされていることを確認します。
アクション
R2
user@R2> show dynamic-tunnels database
*- Signal Tunnels #- PFE-down
Table: inet.3
Destination-network: 10.1.255.0/24
*- Signal Tunnels #- PFE-down
Table: inetcolor.0
Destination-network: 10.1.255.0-0<c>/24
Tunnel to: 10.1.255.4-100<c>/64
Reference count: 3
Next-hop type: IPoIP (bgp-signalled forwarding-nexthop) Tunnel-endpoint: 10.1.255.2
Source address: 10.1.255.2
Next hop: tunnel-composite, 0x76b7238, nhid 592
Reference count: 2
Ingress Route: [OSPF] 10.1.255.4/32, via metric 2
Tunnel Endpoint Ingress Route: [Direct] 10.1.255.2/32
Traffic Statistics: Packets 0, Bytes 0
State: Up
Aggregate Traffic Statistics:
Tunnel Encapsulation: Dest 10.1.255.2, Src 10.1.255.2, IPoIP, Tunnel-Id 1
Traffic Statistics: Packets 0, Bytes 0
意味
R2 の出力は、トンネルが稼働しており、BGP がシグナリングされていることを示しています。
ルート解決の検証
目的
inetcolor.0テーブル内のルートのルート解決を検証するには、 show route table inetcolor.0 動作モードコマンドを使用します。
アクション
user@R2> show route table inetcolor.0
inetcolor.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.255.0-0<c>/24
*[Tunnel/305] 01:33:33
Tunnel
10.1.255.4-100<c>/64
*[Tunnel/305] 01:28:44, metric 2
Tunnel Composite, BGP-Signal (src 10.1.255.2 dest 10.1.255.4-100<c>)
意味
R2 出力は、 10.1.255.4 へのトンネルがBGPシグナリングされていることを示します。
エンドツーエンドの到達可能性を検証
目的
ping 192.168.255.5 source 192.168.255.1 count 2運用モードコマンドを使用して、R1がR5にpingを実行できることを確認します。
アクション
user@R1>ping 192.168.255.5 source 192.168.255.1 count 2
PING 192.168.255.5 (192.168.255.5): 56 data bytes
64 bytes from 192.168.255.5: icmp_seq=0 ttl=63 time=2.784 ms
64 bytes from 192.168.255.5: icmp_seq=1 ttl=63 time=1.904 ms
--- 192.168.255.5 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.904/2.344/2.784/0.440 ms
意味
R1からの出力は、R1がR5にpingを実行できることを示しています。
変更履歴テーブル
サポートされる機能は、使用しているプラットフォームとリリースによって決まります。 機能エクスプローラー を使用して、機能がお使いのプラットフォームでサポートされているかどうかを確認します。