サービスの改善にご協力お願いします。

お客様のご意見をお聞かせください。

アンケートの所要時間はおよそ 2 分です。

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
BGPユーザーガイド
Table of Contents Expand all
list Table of Contents

この機械翻訳はお役に立ちましたでしょうか?

starstarstarstarstar
Go to English page
免責事項:

このページは、サードパーティー製機械翻訳ソフトウェアを使用して翻訳されます。質の高い翻訳を提供するために合理的な対応はされていますが、ジュニパーネットワークスがその正確性を保証することはできかねます。この翻訳に含まれる情報の正確性について疑問が生じた場合は、英語版を参照してください. ダウンロード可能なPDF (英語版のみ).

BGP セッションの自律システム

date_range 19-Jan-25

BGPローカルAS属性について

インターネットサービスプロバイダ(ISP)が異なる自律システム(AS)に属するネットワークを取得した場合、取得したネットワークのBGPピアを取得しているISPのASに移動するためのシームレスな方法はありません。新しいAS番号でBGPピアを設定するプロセスは、時間と手間がかかる場合があります。顧客は、ピアの配置や構成を変更したくない、またはすぐに変更できない場合があります。このような移行期間中は、BGPの更新で以前のAS番号を使うように、新しいASでBGP対応デバイスを設定すると便利です。この以前のAS番号は 、ローカルASと呼ばれます。

ローカルAS番号を使用することで、取得されたネットワーク内のルーティングデバイスが以前のASに属するように見えるようになります。

たとえば、ASが 65200のISP Aは、ASが 65250のISP Bを取得します。ISP B には、構成を変更したくない顧客 ISP C があります。ISP B が ISP A の一部になると、ISP C との EBGP ピア セッションで使用するために、ローカル AS 番号 65250 が設定されます。その結果、ISP C の外部ピアに直接ルートをエクスポートするために使用される AS パスでは、グローバル AS 番号 65200 の前に、ローカル AS 番号 65250 が先頭に付加されるか、代わりに使用されます。

内部BGP(IBGP)ピアからルートを受け取る場合、ASパスにはグローバルAS番号の前の先頭に付加された、ローカルAS番号が含まれます。

ルートがスタティックルートやBGPにインポートされる内部ゲートウェイプロトコル(IGP)ルートなどの外部ルートである場合は、グローバルAS番号の代わりにローカルAS番号が使用されます。ルートが外部で、グローバルAS番号をASパスに含めるようにする場合、 as-path-expand または as-path-prependを使用するルーティングポリシーを適用できます。as-path-expandポリシーアクションを使用して、グローバルAS番号をローカルAS番号の後ろに配置します。as-path-prependポリシーアクションを使用して、グローバルAS番号をローカルAS番号の前に配置します。

たとえば、以下のように表示されます。

content_copy zoom_out_map
user@R2# show policy-options
policy-statement prepend-global {
    term 1 {
        from protocol static;
        then {
            as-path-prepend 65200; # or use as-path-expand
            accept;
        }
    }
}
content_copy zoom_out_map
user@R2# show protocols bgp  
group ext {
    export prepend-global;
    type external;
    local-as 65250;
    neighbor 10.0.0.1 {
        peer-as 65100;
    }
    neighbor 10.1.0.2 {
        peer-as 65300;
    }
}
content_copy zoom_out_map
user@R2# show routing-options
static {
    route 10.1.1.1/32 next-hop 10.0.0.1;
}
autonomous-system 65200;
content_copy zoom_out_map
user@R3# run show route 10.1.1.1 protocol bgp
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.1.1.1/32         *[BGP/170] 00:05:11, localpref 100
                      AS path: 65200 65250 I, validation-state: unverified
                    > to 10.1.0.1 via lt-1/2/0.4

プロバイダエッジ(PE)デバイスが外部BGP(EBGP)を使用してカスタマーエッジ(CE)デバイスとピアリングするレイヤー3 VPNのシナリオでは、 local-as ステートメントの動作は非VPNシナリオとは異なります。VPNのシナリオで、マスターインスタンスで定義されているグローバルAS番号は、デフォルトでASパスの先頭に付加されます。この動作を上書きするには、次に示すように、PE デバイスのルーティング インスタンス BGP 設定で no-prepend-global-as を設定します。

content_copy zoom_out_map
user@R2# show routing-instances
red {
    instance-type vrf;
    interface fe-1/2/0.2;
    route-distinguisher 10:1;
    vrf-target target:10:1;
    protocols {
        bgp {
            group toR1 {
                type external;
                peer-as 65001;
                local-as 65200 no-prepend-global-as;
                neighbor 10.1.1.1;
            }
        }
    }
}

Junosオペレーティングシステム(Junos OS)のローカルAS属性の実装では、次のオプションがサポートされています。

  • Local AS with private option- private オプションを使用すると、EBGPネイバーとのBGPセッション確立時にローカルASが使用されますが、他の IBGPおよび EBGPピアに送信されたASパス内には表示されません。外部ピアに送信されるASパスには、グローバルASのみが含まれます。

    privateオプションは、以前のASで設定されたままのルーティングデバイスとローカルピアリングを確立する場合や、ピアの配置をまだ変更していない特定のカスタマーとローカルピアを確立する場合に便利です。ローカルASは、EBGPネイバーとのBGPセッションを確立するために使用されますが、別のAS内で外部ピアに送信されたASパスでは非表示になっています。

    外部ピアに送信されるASパスで、ローカルASがグローバルASの前の先頭に付加されないように、 private オプションを含めます。privateオプションを指定すると、EBGPネイバーに送信されたASパスの先頭にのみローカルASが付加されます。

    たとえば、 図 1 では、ルーター 1 とルーター 2 は AS 64496 に、ルーター 4 は AS 64511 に、ルーター 3 は AS 64510 に存在します。ルーター2は、以前はAS 64497に属していましたが、別のネットワークとマージされ、現在はAS 64496に属しています。ルーター3は以前のAS(64497)を使用してルーター2とピアリングするため、ルーター3とのピアリングを維持するには、ルーター2を64497のローカルASで設定する必要があります。ローカルASを64497に設定すると、ルーター2はルーター3にルートをアドバタイズするときにAS 64497を追加できます。ルーター3は、プレフィックス10/8の64497 64496のASパスを確認します。

    図 1: ローカルAS設定ローカルAS設定

    ルーター2が他のピアへのアナウンスにローカルAS番号を追加しないようにするには、 local-as 64497 private ステートメントを使用します。このステートメントでは、ルーター1とルーター4にルートを通知するときにローカルAS 64497を含まないよう、ルーター2を設定します。この場合、ルーター4は、プレフィックス10.222/16のASパス64496 64510を確認します。

  • Local AS with alias option- Junos OSリリース9.5以降では、ローカルASをエイリアスとして設定できます。BGPオープンセッションの確立中、オープンメッセージで使用されるASは、ローカルASとグローバルASが交互に入れ替わります。ローカルASをEBGPネイバーとの接続に使用する場合、BGPピアセッションの確立時に、ローカルASのみがASパスの先頭に付加されます。グローバルASがEBGPネイバーとの接続に使用される場合は、BGPピアセッションが確立されたとき、グローバルASのみがASパスの先頭に付加されます。また、 alias オプションを使用すると、そのEBGPネイバーから学習したルートのASパスの先頭にローカルASが付加されません。そのため、ローカルASは他の外部ピアから非表示のままです。

    aliasオプションを使用してローカルASを設定すると、取得したネットワーク内のルーティングデバイスを新しいASに移行する場合に特に便利です。移行プロセス中に、一部のルーティングデバイスは新しいASで設定されることがありますが、他のルーティングデバイスは以前のASのままで設定されます。たとえば、ルートリフレクタとして機能するいずれかの新しいASルーティングデバイスに最初に移行することがお勧めです。ただし、ルートリフレクタクライアントを段階的に移行する場合、各ルートリフレクタは、新しいASで設定されたルーティングデバイスとピアするだけでなく、以前のASで設定されたルーティングデバイスともピアリングする必要があります。ローカルピアセッションを確立するには、ネットワーク内のBGPピアがローカルASとグローバルASの両方を使用すると便利です。同時に、別のASにルートをエクスポートする際に、このローカルASを外部ピアから非表示にして、ASパスでグローバルASのみを使用します。このような状況では、 alias オプションを構成します。

    [edit routing-options]階層レベルで設定されたグローバルASのエイリアスとしてローカルASを設定するには、aliasオプションを含めます。BGPオープンセッションの確立中にローカルASをエイリアスとして設定する場合、オープンメッセージに使用されたASは、ローカルASとグローバルASが交互に入れ替わります。EBGPネイバーとのピアセッションがそのローカルASを使用して確立された場合にのみ、ローカルASがASパスの先頭に追加されます。ローカルASは、他のすべての外部ピアに送信されるASパスで非表示になっています。BGPセッションがグローバルASを使用して確立されている場合は、グローバルASのみがASパスの先頭に追加されます。

    注:

    private オプションと alias オプションは相互に排他的です。同じ local-as ステートメントで両方のオプションを設定することはできません。

  • Local AS with option not to prepend the global AS- Junos OSリリース9.6以降では、グローバルASを先頭に付加しないオプションでローカルASを設定することができます。ローカルASのみが外部ピアに送信されるASパスに含まれます。

    仮想プライベートネットワーク(VPN)のシナリオで、アウトバウンドBGPアップデートからグローバルAS番号を削除する場合は、 no-prepend-global-as オプションを使用します。このオプションは、VPNからグローバルASを非表示にするaVPNシナリオで便利です。

    [edit routing-options]階層レベルに設定されたグローバルASを外部ピアに送信されるASパスから削除するには、no-prepend-global-asオプションを含めます。このオプションを使用すると、ローカルASのみがカスタマーエッジ(CE)デバイスに送信されたルートのASパスに含まれます。

  • Number of loops option- ローカルAS機能では、AS_PATH属性でAS番号を検知したことにより、ルートを破棄または非表示にする回数の指定もサポートしています。たとえば、 loops 1を設定すると、AS番号がパス内で1回以上検知された場合に、ルートが非表示になります。これはデフォルトの動作です。loops 2を設定した場合、AS番号がパスで2回以上検知されると、ルートは非表示になります。

    loops number ステートメントでは、1 から 10 までを設定できます。

    注:

    任意のBGPグループにローカルAS値を設定すると、すべてのBGPグループに対してASとローカルASの両方の値を使用して、ルーティングループの検出が実行されます。

    EBGPまたはIBGPピアのローカルASが現在のASと同じ場合は、 local-as ステートメントを使用してローカルAS番号を指定しないでください。

    VRF内でローカルASを設定すると、ASパスのループ検知メカニズムに影響を与えます。デバイスに設定されたすべての local-as ステートメントは、単一のASドメインの一部です。ASパスループ検知メカニズムの基になるのは、ドメイン内に一致するASが存在するかを探すことです。

例:EBGPセッションのローカルASを設定する

この例では、BGPインバウンドとアウトバウンドの更新でグローバルASとローカルASの両方が使用されるように、BGPピアに対してローカル自律システム(AS)を設定する方法を示しています。

要件

この例を構成する前に、デバイスの初期化以上の特別な構成は必要ありません。

概要

local-asステートメントは、ISPがマージしてカスタマーの設定(特に、カスタマーがピア関係を確立するように設定されているAS)を保持したい場合に使用します。local-asステートメントは、ISPのルーターが別のASに移動した場合でも、カスタマールーターにすでに設定されているAS番号をシミュレートします。

この例では、 local-as ステートメントを使用してローカルASを設定する方法を示しています。local-as ステートメントは、グローバル、グループ、およびネイバー階層レベルでBGPに対してサポートされています。

local-as ステートメントを設定する場合、AS番号を指定する必要があります。1 から 4,294,967,295 までの数値をプレーン番号形式で指定できます。Junos OSリリース9.1以降では、RFC 4893の4 オクテットAS番号スペースのBGPサポートで定義されているとおり、AS番号の範囲が拡張されて、4バイトAS番号のBGPサポートを提供します。Junos OSリリース9.3以降では、ピリオドで連結された2つの整数値のASドット表記形式を使用して、4バイトAS番号を設定することもできます。<<c0/>>.<<c1/>>.16-bit high-order value in decimal16-bit low-order value in decimal たとえば、プレーン番号形式では65,546の4バイトAS番号は、ASドット表記形式では1.10と表されます。0.0 から 65535.65535 までの値を AS ドット表記形式で指定できます。Junos OSは、今後も2バイトAS番号のサポートを継続します。2バイトAS番号の範囲は、1~65535(4バイト範囲のサブセット)です。

図 2サンプルのトポロジーを示しています。

図 2: ローカルASを設定するためのトポロジーローカルASを設定するためのトポロジー

この例で、デバイスR2は以前AS 250に属していましたが、現在はAS 200にあります。デバイスR1とデバイスR3は、新しいAS番号(AS 200)とではなく、AS 250とピアに設定されています。デバイスR2には、 autonomous-system 200 ステートメントで設定された新しいAS番号が付いています。ピアリングセッションが機能するように、BGP設定に local-as 250 ステートメントが追加されます。local-as 250が設定されているため、デバイスR2はBGPのインバウンドおよびアウトバウンドアップデートにグローバルAS(200)とローカルAS(250)の両方を含めます。

設定

CLIクイック構成

この例をすばやく設定するには、次のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク構成に合わせて必要な詳細を変更し、[edit]階層レベルのCLIにコマンドをコピー&ペーストしてください。

デバイスR1

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.1/30
set interfaces lo0 unit 1 family inet address 192.168.0.1/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext peer-as 250
set protocols bgp group ext neighbor 10.0.0.2
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 10.1.0.0/30 next-hop 10.0.0.2
set routing-options autonomous-system 100

デバイスR2

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 2 family inet address 10.0.0.2/30
set interfaces fe-1/2/1 unit 3 family inet address 10.1.0.1/30
set interfaces lo0 unit 2 family inet address 192.168.0.2/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext local-as 250
set protocols bgp group ext neighbor 10.0.0.1 peer-as 100
set protocols bgp group ext neighbor 10.1.0.2 peer-as 300
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options autonomous-system 200

デバイスR3

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 4 family inet address 10.1.0.2/30
set interfaces lo0 unit 3 family inet address 192.168.0.3/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext peer-as 250
set protocols bgp group ext neighbor 10.1.0.1
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 10.0.0.0/30 next-hop 10.1.0.1
set routing-options autonomous-system 300

デバイスR1の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

Device R1を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@R1# set fe-1/2/0 unit 1 family inet address 10.0.0.1/30
    user@R1# set lo0 unit 1 family inet address 192.168.0.1/32
    
  2. 外部BGP(EBGP)を設定します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R1# set type external
    user@R1# set export send-direct
    user@R1# set export send-static
    user@R1# set peer-as 250
    user@R1# set neighbor 10.0.0.2
    
  3. ルーティングポリシーを設定します。

    content_copy zoom_out_map
    [edit policy-options]
    user@R1# set policy-statement send-direct term 1 from protocol direct
    user@R1# set policy-statement send-direct term 1 then accept
    user@R1# set policy-statement send-static term 1 from protocol static
    user@R1# set policy-statement send-static term 1 then accept
    
  4. デバイスR2とデバイスR3の間のリモートネットワークへの静的ルートを設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R1# set static route 10.1.0.0/30 next-hop 10.0.0.2
    
  5. グローバルAS番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R1# set autonomous-system 100
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@R1# show interfaces
fe-1/2/0 {
    unit 1 {
        family inet {
            address 10.0.0.1/30;
        }
    }
}
lo0 {
    unit 1 {
        family inet {
            address 192.168.0.1/32;
        }
    }
}
content_copy zoom_out_map
user@R1# show policy-options
policy-statement send-direct {
    term 1 {
        from protocol direct;
        then accept;
    }
}
policy-statement send-static {
    term 1 {
        from protocol static;
        then accept;
    }
}
content_copy zoom_out_map
user@R1# show protocols
bgp {
    group ext {
        type external;
        export [ send-direct send-static ];
        peer-as 250;
        neighbor 10.0.0.2;
    }
}
content_copy zoom_out_map
user@R1# show routing-options
static {
    route 10.1.0.0/30 next-hop 10.0.0.2;
}
autonomous-system 100;

デバイスの設定が完了したら、設定モードから commit を入力します。

デバイスR2の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

デバイスR2 を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@R2# set fe-1/2/0 unit 2 family inet address 10.0.0.2/30
    user@R2# set fe-1/2/1 unit 3 family inet address 10.1.0.1/30
    user@R2# set lo0 unit 2 family inet address 192.168.0.2/32
    
  2. EBGPを設定します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R2# set type external
    user@R2# set export send-direct
    user@R2# set export send-static
    user@R2# set neighbor 10.0.0.1 peer-as 100
    user@R2# set neighbor 10.1.0.2 peer-as 300
    
  3. ローカル自律システム(AS)番号を設定します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R2# set local-as 250
    
  4. グローバルAS番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R2# set autonomous-system 200
    
  5. ルーティングポリシーを設定します。

    content_copy zoom_out_map
    [edit policy-options]
    user@R2# set policy-statement send-direct term 1 from protocol direct
    user@R2# set policy-statement send-direct term 1 then accept
    user@R2# set policy-statement send-static term 1 from protocol static
    user@R2# set policy-statement send-static term 1 then accept
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@R2# show interfaces
fe-1/2/0 {
    unit 2 {
        family inet {
            address 10.0.0.2/30;
        }
    }
}
fe-1/2/1 {
    unit 3 {
        family inet {
            address 10.1.0.1/30;
        }
    }
}
lo0 {
    unit 2 {
        family inet {
            address 192.168.0.2/32;
        }
    }
}
content_copy zoom_out_map
user@R2# show policy-options
policy-statement send-direct {
    term 1 {
        from protocol direct;
        then accept;
    }
}
policy-statement send-static {
    term 1 {
        from protocol static;
        then accept;
    }
}
content_copy zoom_out_map
user@R2# show protocols
bgp {
    group ext {
        type external;
        export [ send-direct send-static ];
        local-as 250;
        neighbor 10.0.0.1 {
            peer-as 100;
        }
        neighbor 10.1.0.2 {
            peer-as 300;
        }
    }
}
content_copy zoom_out_map
user@R2# show routing-options
autonomous-system 200;

デバイスの設定が完了したら、設定モードから commit を入力します。

デバイス R3 の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

デバイス R3 を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@R3# set fe-1/2/0 unit 4 family inet address 10.1.0.2/30
    user@R3# set lo0 unit 3 family inet address 192.168.0.3/32
    
  2. EBGPを設定します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R3# set type external
    user@R3# set export send-direct
    user@R3# set export send-static
    user@R3# set peer-as 250
    user@R3# set neighbor 10.1.0.1
    
  3. グローバル自律システム(AS)番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R3# set autonomous-system 300
    
  4. デバイスR1とデバイスR2の間のリモートネットワークへの静的ルートを設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R3# set static route 10.0.0.0/30 next-hop 10.1.0.1
    
  5. ルーティングポリシーを設定します。

    content_copy zoom_out_map
    [edit policy-options]
    user@R3# set policy-statement send-direct term 1 from protocol direct
    user@R3# set policy-statement send-direct term 1 then accept
    user@R3# set policy-statement send-static term 1 from protocol static
    user@R3# set policy-statement send-static term 1 then accept
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@R3# show interfaces
fe-1/2/0 {
    unit 4 {
        family inet {
            address 10.1.0.2/30;
        }
    }
}
lo0 {
    unit 3 {
        family inet {
            address 192.168.0.3/32;
        }
    }
}
content_copy zoom_out_map
user@R3# show policy-options
policy-statement send-direct {
    term 1 {
        from protocol direct;
        then accept;
    }
}
policy-statement send-static {
    term 1 {
        from protocol static;
        then accept;
    }
}
content_copy zoom_out_map
user@R3# show protocols
bgp {
    group ext {
        type external;
        export [ send-direct send-static ];
        peer-as 250;
        neighbor 10.1.0.1;
    }
}
content_copy zoom_out_map
user@R3# show routing-options
static {
    route 10.0.0.0/30 next-hop 10.1.0.1;
}
autonomous-system 300;

デバイスの設定が完了したら、設定モードから commit を入力します。

検証

設定が正常に機能していることを確認します。

ローカルおよびグローバルAS設定の確認

目的

デバイスR2でローカルおよびグローバルAS設定が行われていることを確認します。

アクション

動作モードからshow bgp neighborsコマンドを入力します。

content_copy zoom_out_map
user@R2> show bgp neighbors
Peer: 10.0.0.1+179 AS 100      Local: 10.0.0.2+61036 AS 250  
  Type: External    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Export: [ send-direct send-static ] 
  Options: <Preference PeerAS LocalAS Refresh>
  Holdtime: 90 Preference: 170 Local AS: 250 Local System AS: 200
  Number of flaps: 0
  Peer ID: 192.168.0.1     Local ID: 192.168.0.2       Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 0   
  BFD: disabled, down
  Local Interface: fe-1/2/0.2                       
  NLRI for restart configured on peer: inet-unicast
  NLRI advertised by peer: inet-unicast
  NLRI for this session: inet-unicast
  Peer supports Refresh capability (2)
  Stale routes from peer are kept for: 300
  Peer does not support Restarter functionality
  NLRI that restart is negotiated for: inet-unicast
  NLRI of received end-of-rib markers: inet-unicast
  NLRI of all end-of-rib markers sent: inet-unicast
  Peer supports 4 byte AS extension (peer-as 100)
  Peer does not support Addpath
  Table inet.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              1
    Received prefixes:            3
    Accepted prefixes:            2
    Suppressed due to damping:    0
    Advertised prefixes:          4
  Last traffic (seconds): Received 6    Sent 14   Checked 47  
  Input messages:  Total 258    Updates 3       Refreshes 0     Octets 4969
  Output messages: Total 258    Updates 2       Refreshes 0     Octets 5037
  Output Queue[0]: 0

Peer: 10.1.0.2+179 AS 300      Local: 10.1.0.1+52296 AS 250  
  Type: External    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Export: [ send-direct send-static ] 
  Options: <Preference PeerAS LocalAS Refresh>
  Holdtime: 90 Preference: 170 Local AS: 250 Local System AS: 200
  Number of flaps: 0
  Peer ID: 192.168.0.3     Local ID: 192.168.0.2       Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 1   
  BFD: disabled, down
  Local Interface: fe-1/2/1.3                       
  NLRI for restart configured on peer: inet-unicast
  NLRI advertised by peer: inet-unicast
  NLRI for this session: inet-unicast
  Peer supports Refresh capability (2)
  Stale routes from peer are kept for: 300
  Peer does not support Restarter functionality
  NLRI that restart is negotiated for: inet-unicast
  NLRI of received end-of-rib markers: inet-unicast
  NLRI of all end-of-rib markers sent: inet-unicast
  Peer supports 4 byte AS extension (peer-as 300)
  Peer does not support Addpath
  Table inet.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              1
    Received prefixes:            3
    Accepted prefixes:            2
    Suppressed due to damping:    0
    Advertised prefixes:          4
  Last traffic (seconds): Received 19   Sent 26   Checked 9   
  Input messages:  Total 256    Updates 3       Refreshes 0     Octets 4931
  Output messages: Total 256    Updates 2       Refreshes 0     Octets 4999
  Output Queue[0]: 0
意味

ローカルAS:250およびローカルシステムAS:200の出力は、デバイスR2に予期される設定があることを示しています。さらに、出力は、オプション リストに LocalAS が含まれていることを示しています。

BGP ピアリング セッションの確認

目的

セッションが確立されていること、およびローカルAS番号の250が表示されていることを確認します。

アクション

動作モードからshow bgp summaryコマンドを入力します。

content_copy zoom_out_map
user@R1> show bgp summary
Groups: 1 Peers: 1 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 4          2          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.0.0.2                250        232        233       0       4     1:42:37 2/4/4/0              0/0/0/0
content_copy zoom_out_map
user@R3> show bgp summary
Groups: 1 Peers: 1 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 4          2          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
10.1.0.1                250        235        236       0       4     1:44:25 2/4/4/0              0/0/0/0
意味

デバイスR1とデバイスR3は、デバイスR2が実際にAS 200に存在する場合でも、AS 250内のデバイスとのピアリングとして表されます。

BGP ASパスの検証

目的

ルーティングテーブルにルートがあり、ASパスにローカルAS番号250が表示されていることを確認します。

アクション

設定モードからset route protocol bgpコマンドを入力します。

content_copy zoom_out_map
user@R1> show route protocol bgp
inet.0: 6 destinations, 8 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.0/30         [BGP/170] 01:46:44, localpref 100
                      AS path: 250 I
                    > to 10.0.0.2 via fe-1/2/0.1
10.1.0.0/30         [BGP/170] 01:46:44, localpref 100
                      AS path: 250 I
                    > to 10.0.0.2 via fe-1/2/0.1
192.168.0.2/32     *[BGP/170] 01:46:44, localpref 100
                      AS path: 250 I
                    > to 10.0.0.2 via fe-1/2/0.1
192.168.0.3/32     *[BGP/170] 01:46:40, localpref 100
                      AS path: 250 300 I
                    > to 10.0.0.2 via fe-1/2/0.1
content_copy zoom_out_map
user@R3> show route protocol bgp

inet.0: 6 destinations, 8 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.0.0/30         [BGP/170] 01:47:10, localpref 100
                      AS path: 250 I
                    > to 10.1.0.1 via fe-1/2/0.4
10.1.0.0/30         [BGP/170] 01:47:10, localpref 100
                      AS path: 250 I
                    > to 10.1.0.1 via fe-1/2/0.4
192.168.0.1/32     *[BGP/170] 01:47:10, localpref 100
                      AS path: 250 100 I
                    > to 10.1.0.1 via fe-1/2/0.4
192.168.0.2/32     *[BGP/170] 01:47:10, localpref 100
                      AS path: 250 I
                    > to 10.1.0.1 via fe-1/2/0.4
意味

出力では、デバイスR2が実際にはAS 200にあっても、AS 250を含むASパスを持つルートがデバイスR1とデバイスR3にあるように見えることが示されています。

例:EBGPセッションのプライベートローカルASを設定する

この例では、プライベートローカル自律システム(AS)番号を設定する方法を示しています。ローカルASは、ピアリングにローカルAS番号を使用するピアにはアドバタイズされますが、ピアリングにグローバルAS番号を使用できるピアへのアナウンスでは非表示になっているため、プライベートと見なされます。

要件

この例を構成する前に、デバイスの初期化以上の特別な構成は必要ありません。

概要

local-asステートメントは、ISPがマージしてカスタマーの設定(特に、カスタマーがピア関係を確立するように設定されているAS)を保持したい場合に使用します。local-asステートメントは、ISPのルーターが別のASに移動した場合でも、カスタマールーターにすでに設定されているAS番号をシミュレートします。

privateオプションを使用すると、外部BGP(EBGP)とのBGPセッション確立時にローカルASが使用されますが、他のEBGPピアに送信されたASパス内には表示されません。外部ピアに送信されるASパスには、グローバルASのみが含まれます。

privateオプションは、以前のASで設定されたままのルーティングデバイスとローカルピアリングを確立する場合や、ピアの配置をまだ変更していない特定のカスタマーとローカルピアを確立する場合に便利です。ローカルASは、EBGPネイバーとのBGPセッションを確立するために使用されますが、別のAS内で外部ピアに送信されたASパスでは非表示になっています。

外部ピアに送信されるASパスで、ローカルASがグローバルASの前の先頭に付加されないように、 private オプションを含めます。privateオプションを指定すると、EBGPネイバーに送信されたASパスの先頭にのみローカルASが付加されます。

図 3サンプルのトポロジーを示しています。

図 3: プライベートローカルASを設定するためのトポロジープライベートローカルASを設定するためのトポロジー

デバイスR1はAS 64496にあります。デバイスR2はAS 64510にあります。デバイスR3はAS 64511にあります。デバイスR4はAS 64512にあります。デバイスR1は、以前はAS 64497に属していましたが、別のネットワークとマージされ、現在はAS 64496に属しています。デバイスR3は以前のASである64497を使用してデバイスR1とまだピア関係にあるため、デバイスR3とのピアリングを維持するには、デバイスR1を64497のローカルASで設定する必要があります。64497のローカルASを設定すると、デバイスR3へのルートをアドバタイズするときに、デバイスR1がAS 64497を追加できるようになります。デバイスR3は、プレフィックス10.1.1.2/32の64497 64496のASパスを確認します。これは、デバイスR2のループバックインターフェイスです。デバイスR4は、デバイスR3の後ろにあり、デバイスR2のループバックインターフェイスへの64511 64497 64496 64510のASパスを確認します。デバイスR1が他のピアへの通知にローカルAS番号を追加しないようにするために、この例では local-as 64497 private ステートメントを含めています。privateオプションは、デバイスR2へのルートを通知するときに、ローカルAS 64497を含まないようにデバイスR1を設定します。デバイスR2は、デバイスR3への64496 64511のASパス、およびデバイスR4への64496 64511 64512のASパスを確認します。デバイスR1の設定で private オプションを選択すると、デバイスR1がデバイスR2に再アドバタイズするASパスから、AS番号64497がなくなります。

デバイスR1は、デバイスR3以外のすべてのルーターからプライベートローカルASを非表示にしています。privateオプションは、デバイスR1がデバイスR3から受信(学習)し、デバイスR1が他のルーターに再アドバタイズするルートに適用されます。デバイスR3から学習されたこれらのルートがデバイスR1からデバイスR2に再アドバタイズされると、デバイスR2に対してアドバタイズされたASパスからプライベートローカルASがなくなります。

設定

CLIクイック構成

この例をすばやく設定するには、次のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク構成に合わせて必要な詳細を変更し、[edit]階層レベルのCLIにコマンドをコピー&ペーストしてください。

デバイスR1

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 3 family inet address 192.168.1.1/24
set interfaces fe-1/2/1 unit 5 family inet address 192.168.10.1/24
set interfaces lo0 unit 2 family inet address 10.1.1.1/32
set protocols bgp group external-AS64511 type external
set protocols bgp group external-AS64511 peer-as 64511
set protocols bgp group external-AS64511 local-as 64497
set protocols bgp group external-AS64511 local-as private
set protocols bgp group external-AS64511 neighbor 192.168.1.2
set protocols bgp group external-AS64510 type external
set protocols bgp group external-AS64510 peer-as 64510
set protocols bgp group external-AS64510 neighbor 192.168.10.2
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64496

デバイスR2

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 6 family inet address 192.168.10.2/24
set interfaces lo0 unit 3 family inet address 10.1.1.2/32
set protocols bgp group external type external
set protocols bgp group external export send-direct
set protocols bgp group external peer-as 64496
set protocols bgp group external neighbor 192.168.10.1
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64510

デバイスR3

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 4 family inet address 192.168.1.2/24
set interfaces fe-1/2/1 unit 7 family inet address 192.168.5.1/24
set interfaces lo0 unit 4 family inet address 10.1.1.3/32
set protocols bgp group external type external
set protocols bgp group external export send-direct
set protocols bgp group external neighbor 192.168.1.1 peer-as 64497
set protocols bgp group external neighbor 192.168.5.2 peer-as 64512
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64511

デバイス R4

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 8 family inet address 192.168.5.2/24
set interfaces lo0 unit 5 family inet address 10.1.1.4/32
set protocols bgp group external type external
set protocols bgp group external export send-direct
set protocols bgp group external peer-as 64511
set protocols bgp group external neighbor 192.168.5.1
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64512

デバイスR1の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

Device R1を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces fe-1/2/0 unit 3]
    user@R1# set family inet address 192.168.1.1/24
    [edit interfaces fe-1/2/1 unit 5]
    user@R1# set family inet address 192.168.10.1/24
    [edit interfaces lo0 unit 2]
    user@R1# set family inet address 10.1.1.1/32
    
  2. デバイスR2とのEBGPピアリングセッションを設定します。

    content_copy zoom_out_map
    [edit protocols bgp group external-AS64510]
    user@R1# set type external
    user@R1# set peer-as 64510
    user@R1# set neighbor 192.168.10.2
    
  3. デバイスR3とのEBGPピアリングセッションを設定します。

    content_copy zoom_out_map
    [edit protocols bgp group external-AS64511]
    user@R1# set type external
    user@R1# set peer-as 64511
    user@R1# set local-as 64497
    user@R1# set local-as private
    user@R1# set neighbor 192.168.1.2
    
  4. ルーティングポリシーを設定します。

    content_copy zoom_out_map
    [edit policy-options policy-statement send-direct term 1]
    user@R1# set from protocol direct
    user@R1# set then accept
    
  5. グローバル自律システム(AS)番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R1# set autonomous-system 64496
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@R1# show interfaces
fe-1/2/0 {
    unit 3 {
        family inet {
            address 192.168.1.1/24;
        }
    }
}
fe-1/2/1 {
    unit 5 {
        family inet {
            address 192.168.10.1/24;
        }
    }
}
lo0 {
    unit 2 {
        family inet {
            address 10.1.1.1/32;
        }
    }
}
content_copy zoom_out_map
user@R1# show policy-options
policy-statement send-direct {
    term 1 {
        from protocol direct;
        then accept;
    }
}
content_copy zoom_out_map
user@R1# show protocols
bgp {
    group external-AS64511 {
        type external;
        peer-as 64511;
        local-as 64497 private;
        neighbor 192.168.1.2;
    }
    group external-AS64510 {
        type external;
        peer-as 64510;
        neighbor 192.168.10.2;
    }
}
content_copy zoom_out_map
user@R1# show routing-options
autonomous-system 64496;

デバイスの設定が完了したら、設定モードから commit を入力します。

トポロジー内の他のデバイスについても、必要に応じて設定を繰り返します。

検証

設定が正常に機能していることを確認します。

デバイスR2のASパスの確認

目的

デバイスR2がデバイスR3およびデバイスR4へのASパスとしてAS 64497を持っていないことを確認します。

アクション

動作モードからshow route protocol bgpコマンドを入力します。

content_copy zoom_out_map
user@R2> show route protocol bgp
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.1.1.3/32        *[BGP/170] 01:33:11, localpref 100
                      AS path: 64496 64511 I
                    > to 192.168.10.1 via fe-1/2/0.6
10.1.1.4/32        *[BGP/170] 01:33:11, localpref 100
                      AS path: 64496 64511 64512 I
                    > to 192.168.10.1 via fe-1/2/0.6
192.168.5.0/24     *[BGP/170] 01:49:15, localpref 100
                      AS path: 64496 64511 I
                    > to 192.168.10.1 via fe-1/2/0.6
意味

デバイスR2のASパスにAS 64497は含まれません。

デバイスR3のASパスを確認する

目的

ローカルAS 64497が、EBGPネイバーR3に送信されたASパスの先頭にのみ付加されていることを確認します。デバイスR3は、プレフィックス10.1.1.2/32の64497 64496のASパスを確認します。これは、デバイスR2のループバックインターフェイスです。

アクション

動作モードからshow route protocol bgpコマンドを入力します。

content_copy zoom_out_map
user@R3> show route protocol bgp
inet.0: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.1.1.2/32        *[BGP/170] 01:35:11, localpref 100
                      AS path: 64497 64496 64510 I
                    > to 192.168.1.1 via fe-1/2/0.4
10.1.1.4/32        *[BGP/170] 01:35:11, localpref 100
                      AS path: 64512 I
                    > to 192.168.5.2 via fe-1/2/1.7
192.168.5.0/24      [BGP/170] 01:51:15, localpref 100
                      AS path: 64512 I
                    > to 192.168.5.2 via fe-1/2/1.7
意味

デバイスR3のデバイスR2へのルート(プレフィックス10.1.1.2)には、デバイスR1に設定されたローカルとグローバル両方のASが含まれます(それぞれ64497と64496)。

BGPの累積IGP属性を理解する

内部ゲートウェイプロトコル(IGP)は、単一ドメインまたは自律システム(AS)内でルーティングを処理するように設計されています。各リンクには、メトリックと呼ばれる特定の値が割り当てられます。2 つのノード間の距離は、パスに沿ったリンクのすべてのメトリック値の合計として計算されます。IGPは、距離に基づいて2つのノード間の最短パスを選択します。

BGPは、多数の独立したAS上でルーティングが可能になるように設計されており、それぞれの運用管理の間での連携は制限されているか、一切ありません。BGP は、パス選択の決定にメトリックを使用しません。

BGPの累積IGP(AIGP)メトリック属性は、単一の管理で複数の連続したBGP ASを実行できる展開を可能にします。このような導入により、BGPはIGPメトリックに基づいてルーティングを決定できます。このようなネットワークでは、IGPが行うのと同様に、BGPがメトリックに基づいてパスを選択することが可能です。この場合、ノードは2つの異なるASにありますが、BGPは2つのノード間の最短パスを選択します。

AIGP 属性は、トンネリングを使用して BGP ネクストホップにパケットを配信するネットワークで特に役立ちます。ジュニパーネットワークス® Junos®オペレーティングシステム(Junos OS)は、現在、2つのBGPアドレスファミリー( family inet labeled-unicastfamily inet6 labeled-unicast)のAIGP属性をサポートしています。

AIGPは、BGPの最適ルート決定プロセスに影響を与えます。AIGP 属性優先ルールは、ローカル優先ルールの後に適用されます。AIGPの距離が比較され、同点に追いつきます。BGP 最適ルート決定プロセスは、解決するネクストホップに AIGP 属性がある場合に、内部コストルールの適用方法にも影響します。AIGPを有効にしない場合、ルートの内部コストは、ルートのネクストホップへのメトリックの計算に基づきます。AIGP を有効にすると、解決 AIGP 距離が内部コストに追加されます。

リリース20.2R1以降、Junos OSはAIGPメトリックのMEDへの変換をサポートしています。この機能は、最適経路の選択に使用されるエンドツーエンドのAIGPメトリック値をMEDに伝送させたい場合に有効にできます。 これは、顧客サイトが2つの異なるサービスプロバイダを介して接続されており、顧客エッジルーターがIGPメトリックベースの決定を必要とするAS間MPLS VPNソリューションで特に役立ちます。minimum-aigpを設定して、effective-aigpが既知の最小値を超えて変更された場合に、ルートの不要な更新を防ぐことができます。効果的なAIGPは、ルートでアドバタイズされるAIGP値に、ネクストホップに到達するためのIGPコストを加えたものです。[edit protocols bgp group <group-name> metric-out]および[edit policy-options policy-statement <name> then metric]階層レベルで effective-aigp および minimum-effective-aigp ステートメントを設定できます。

AIGP属性は、オプションの非推移BGPパス属性であり、インターネットドラフトdraft-ietf-idr-aigp-06、 BGPの累積IGPメトリック属性で指定されています。

例:BGPの累積IGP属性の設定

この例では、BGPの累積IGP(AIGP)メトリック属性を設定する方法を示しています。

要件

この例では、以下のハードウェアとソフトウェアのコンポーネントを使用しています。

  • BGP を話す 7 つのデバイス。

  • Junos OS リリース 12.1 以降。

概要

AIGP属性は、単一の管理者が複数の連続したBGP自律システム(AS)を実行できるデプロイメントを可能にします。このような導入により、BGPはIGPメトリックに基づいてルーティングを決定できます。AIGPを有効にすると、BGPはIGPメトリックに基づいてパスを選択できます。これにより、ノードが異なるASにある場合でも、BGPは2つのノード間の最短パスを選択できます。AIGP 属性は、トンネリングを使用して BGP ネクストホップにパケットを配信するネットワークで特に役立ちます。この例は、MPLS ラベルスイッチ パスで設定された AIGP を示しています。

AIGPを有効にするには、プロトコルファミリーベースでBGP設定に aigp ステートメントを含めます。特定のファミリーでAIGPを設定すると、そのファミリーでAIGP属性を送受信できるようになります。デフォルトでは、AIGP は無効になっています。AIGP が動作不能なネイバーは、AIGP 属性を送信せず、受信した AIGP 属性を暗黙のうちに破棄します。

Junos OSは、AIGP for family inet labeled-unicast および family inet6 labeled-unicastをサポートしています。aigpステートメントは、グローバルBGP、グループ、またはネイバーレベルで特定のファミリに対して設定できます。

デフォルトでは、ローカル接頭部の AIGP 属性の値はゼロです。AIGP対応ネイバーは、 aigp-originate ポリシーアクションを使用して、エクスポートポリシーによって特定のプレフィックスのAIGP属性を発信できます。AIGP属性の値は、プレフィックスまでのIGP距離を反映しています。または、 aigp-originate distance distance ポリシーアクションを使用して値を指定することもできます。設定可能な範囲は 0 から 4,294,967,295 です。AIGP 属性を生成する必要があるノードは 1 つだけです。BGP設定の aigp ステートメントでネイバーがAIGPに対応している場合、AIGP属性は保持され、再アドバタイズされます。

AIGP 属性を起点とするポリシー・アクションには、以下の要件があります。

  • ネイバーは AIGP が有効になっている必要があります。

  • ポリシーは、エクスポートポリシーとして適用する必要があります。

  • プレフィックスには、現在の AIGP 属性があってはなりません。

  • プレフィックスはネクストホップ自己でエクスポートする必要があります。

  • プレフィックスは、AIGPドメイン内に存在する必要があります。通常、ループバックIPアドレスは発信するプレフィックスです。

これらの要件が満たされていない場合、ポリシーは無視されます。

トポロジー図

図 4 この例で使用されているトポロジーを示しています。OSPFは、内部ゲートウェイプロトコル(IGP)として使用されます。内部BGP(IBGP)は、デバイスPE1とデバイスPE4の間に設定されます。外部BGP(EBGP)は、デバイス PE7 とデバイス PE1 の間、デバイス PE4 とデバイス PE3 の間、デバイス PE4 とデバイス PE2 の間に設定されています。デバイス PE4、PE2、および PE3 はマルチホップ用に設定されています。デバイス PE4 は、AIGP 値に基づいてパスを選択し、AIGP とポリシー設定に基づいて AIGP 値を再アドバタイズします。デバイス PE1 は、別の管理ドメインにあるデバイス PE7 に AIGP 値を再アドバタイズします。各デバイスには、2つのループバックインターフェイスアドレスがあります。10.9.9.xはBGPピアリングとルーターIDに、10.100.1.xはBGPネクストホップに使用されます。

デバイス PE1 と PE3 の間のネットワークには、IBGP ピアリングと複数の OSPF エリアがあります。デバイス PE7 への外部リンクは、管理ドメイン外のネイバーが AIGP 対応の場合、AIGP 属性が管理ドメイン外のネイバーに再アドバタイズされることを示すように設定されています。

図 4: BGP における複数パスのアドバタイズメントBGP における複数パスのアドバタイズメント

AIGP属性の発信では、BGPネクストホップはそれ自体である必要があります。BGPネクスト・ホップが変更されない場合、受信したAIGP属性は、そのまま別のAIGPネイバーに再アドバタイズされます。ネクスト・ホップが変更された場合、受信したAIGP属性は、別のAIGPネイバーに増加した値で再アドバタイズされます。値の増加は、前のBGPネクストホップまでのIGP距離を反映しています。デモンストレーションのために、この例では、デバイス PE2 およびデバイス PE3 とのデバイス PE4 の EBGP ピアリング セッションにループバック インターフェイス アドレスを使用しています。これらのセッションではマルチホップが有効になっているため、再帰的なルックアップが実行されてポイントツーポイントのインターフェイスが決定されます。ネクストホップは変化するため、IGP 距離が AIGP 距離に加算されます。

設定

CLIクイック構成

この例をすばやく設定するには、次のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク構成に合わせて必要な詳細を変更し、[edit]階層レベルのCLIにコマンドをコピー&ペーストしてください。

デバイスP1

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 1 description P1-to-PE1
set interfaces fe-1/2/0 unit 1 family inet address 10.0.0.2/30
set interfaces fe-1/2/0 unit 1 family mpls
set interfaces fe-1/2/1 unit 4 description P1-to-P2
set interfaces fe-1/2/1 unit 4 family inet address 10.0.0.29/30
set interfaces fe-1/2/1 unit 4 family mpls
set interfaces fe-1/2/2 unit 8 description P1-to-PE4
set interfaces fe-1/2/2 unit 8 family inet address 10.0.0.17/30
set interfaces fe-1/2/2 unit 8 family mpls
set interfaces lo0 unit 3 family inet address 10.9.9.2/32
set interfaces lo0 unit 3 family inet address 10.100.1.2/32
set protocols rsvp interface fe-1/2/0.1
set protocols rsvp interface fe-1/2/2.8
set protocols rsvp interface fe-1/2/1.4
set protocols mpls label-switched-path P1-to-P2 to 10.9.9.3
set protocols mpls label-switched-path P1-to-PE1 to 10.9.9.1
set protocols mpls label-switched-path P1-to-PE4 to 10.9.9.4
set protocols mpls interface fe-1/2/0.1
set protocols mpls interface fe-1/2/2.8
set protocols mpls interface fe-1/2/1.4
set protocols bgp group internal type internal
set protocols bgp group internal local-address 10.9.9.2
set protocols bgp group internal family inet labeled-unicast aigp
set protocols bgp group internal neighbor 10.9.9.1
set protocols bgp group internal neighbor 10.9.9.3
set protocols bgp group internal neighbor 10.9.9.4
set protocols ospf area 0.0.0.1 interface fe-1/2/0.1 metric 1
set protocols ospf area 0.0.0.1 interface fe-1/2/1.4 metric 1
set protocols ospf area 0.0.0.0 interface fe-1/2/2.8 metric 1
set protocols ospf area 0.0.0.0 interface 10.9.9.2 passive
set protocols ospf area 0.0.0.0 interface 10.9.9.2 metric 1
set protocols ospf area 0.0.0.0 interface 10.100.1.2 passive
set protocols ospf area 0.0.0.0 interface 10.100.1.2 metric 1
set routing-options router-id 10.9.9.2
set routing-options autonomous-system 13979

デバイスP2

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 3 description P2-to-PE1
set interfaces fe-1/2/0 unit 3 family inet address 10.0.0.6/30
set interfaces fe-1/2/0 unit 3 family mpls
set interfaces fe-1/2/1 unit 5 description P2-to-P1
set interfaces fe-1/2/1 unit 5 family inet address 10.0.0.30/30
set interfaces fe-1/2/1 unit 5 family mpls
set interfaces fe-1/2/2 unit 6 description P2-to-PE4
set interfaces fe-1/2/2 unit 6 family inet address 10.0.0.13/30
set interfaces fe-1/2/2 unit 6 family mpls
set interfaces lo0 unit 5 family inet address 10.9.9.3/32
set interfaces lo0 unit 5 family inet address 10.100.1.3/32
set protocols rsvp interface fe-1/2/1.5
set protocols rsvp interface fe-1/2/2.6
set protocols rsvp interface fe-1/2/0.3
set protocols mpls label-switched-path P2-to-PE1 to 10.9.9.1
set protocols mpls label-switched-path P2-to-P1 to 10.9.9.2
set protocols mpls label-switched-path P2-to-PE4 to 10.9.9.4
set protocols mpls interface fe-1/2/1.5
set protocols mpls interface fe-1/2/2.6
set protocols mpls interface fe-1/2/0.3
set protocols bgp group internal type internal
set protocols bgp group internal local-address 10.9.9.3
set protocols bgp group internal family inet labeled-unicast aigp
set protocols bgp group internal neighbor 10.9.9.1
set protocols bgp group internal neighbor 10.9.9.2
set protocols bgp group internal neighbor 10.9.9.4
set protocols ospf area 0.0.0.0 interface fe-1/2/2.6 metric 1
set protocols ospf area 0.0.0.0 interface 10.9.9.3 passive
set protocols ospf area 0.0.0.0 interface 10.9.9.3 metric 1
set protocols ospf area 0.0.0.0 interface 10.100.1.3 passive
set protocols ospf area 0.0.0.0 interface 10.100.1.3 metric 1
set routing-options router-id 10.9.9.3
set routing-options autonomous-system 13979

デバイスPE4

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 7 description PE4-to-P2
set interfaces fe-1/2/0 unit 7 family inet address 10.0.0.14/30
set interfaces fe-1/2/0 unit 7 family mpls
set interfaces fe-1/2/1 unit 9 description PE4-to-P1
set interfaces fe-1/2/1 unit 9 family inet address 10.0.0.18/30
set interfaces fe-1/2/1 unit 9 family mpls
set interfaces fe-1/2/2 unit 10 description PE4-to-PE2
set interfaces fe-1/2/2 unit 10 family inet address 10.0.0.21/30
set interfaces fe-1/2/2 unit 10 family mpls
set interfaces fe-1/0/2 unit 12 description PE4-to-PE3
set interfaces fe-1/0/2 unit 12 family inet address 10.0.0.25/30
set interfaces fe-1/0/2 unit 12 family mpls
set interfaces lo0 unit 7 family inet address 10.9.9.4/32
set interfaces lo0 unit 7 family inet address 10.100.1.4/32
set protocols rsvp interface fe-1/2/0.7
set protocols rsvp interface fe-1/2/1.9
set protocols rsvp interface fe-1/2/2.10
set protocols rsvp interface fe-1/0/2.12
set protocols mpls label-switched-path PE4-to-PE2 to 10.9.9.5
set protocols mpls label-switched-path PE4-to-PE3 to 10.9.9.6
set protocols mpls label-switched-path PE4-to-P1 to 10.9.9.2
set protocols mpls label-switched-path PE4-to-P2 to 10.9.9.3
set protocols mpls interface fe-1/2/0.7
set protocols mpls interface fe-1/2/1.9
set protocols mpls interface fe-1/2/2.10
set protocols mpls interface fe-1/0/2.12
set protocols bgp export next-hop
set protocols bgp export aigp
set protocols bgp group internal type internal
set protocols bgp group internal local-address 10.9.9.4
set protocols bgp group internal family inet labeled-unicast aigp
set protocols bgp group internal neighbor 10.9.9.1
set protocols bgp group internal neighbor 10.9.9.3
set protocols bgp group internal neighbor 10.9.9.2
set protocols bgp group external type external
set protocols bgp group external multihop ttl 2
set protocols bgp group external local-address 10.9.9.4
set protocols bgp group external family inet labeled-unicast aigp
set protocols bgp group external peer-as 7018
set protocols bgp group external neighbor 10.9.9.5
set protocols bgp group external neighbor 10.9.9.6
set protocols ospf area 0.0.0.0 interface fe-1/2/1.9 metric 1
set protocols ospf area 0.0.0.0 interface fe-1/2/0.7 metric 1
set protocols ospf area 0.0.0.0 interface 10.9.9.4 passive
set protocols ospf area 0.0.0.0 interface 10.9.9.4 metric 1
set protocols ospf area 0.0.0.0 interface 10.100.1.4 passive
set protocols ospf area 0.0.0.0 interface 10.100.1.4 metric 1
set protocols ospf area 0.0.0.2 interface fe-1/2/2.10 metric 1
set protocols ospf area 0.0.0.3 interface fe-1/0/2.12 metric 1
set policy-options policy-statement aigp term 10 from protocol static
set policy-options policy-statement aigp term 10 from route-filter 44.0.0.0/24 exact
set policy-options policy-statement aigp term 10 then aigp-originate distance 200
set policy-options policy-statement aigp term 10 then next-hop 10.100.1.4
set policy-options policy-statement aigp term 10 then accept
set policy-options policy-statement next-hop term 10 from protocol bgp
set policy-options policy-statement next-hop term 10 then next-hop 10.100.1.4
set policy-options policy-statement next-hop term 10 then accept
set policy-options policy-statement next-hop term 20 from protocol direct
set policy-options policy-statement next-hop term 20 from route-filter 10.9.9.4/32 exact
set policy-options policy-statement next-hop term 20 from route-filter 10.100.1.4/32 exact
set policy-options policy-statement next-hop term 20 then next-hop 10.100.1.4
set policy-options policy-statement next-hop term 20 then accept
set routing-options static route 44.0.0.0/24 discard
set routing-options router-id 10.9.9.4
set routing-options autonomous-system 13979

デバイスPE1

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 0 description PE1-to-P1
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.1/30
set interfaces fe-1/2/0 unit 0 family mpls
set interfaces fe-1/2/1 unit 2 description PE1-to-P2
set interfaces fe-1/2/1 unit 2 family inet address 10.0.0.5/30
set interfaces fe-1/2/1 unit 2 family mpls
set interfaces fe-1/2/2 unit 14 description PE1-to-PE7
set interfaces fe-1/2/2 unit 14 family inet address 10.0.0.9/30
set interfaces lo0 unit 1 family inet address 10.9.9.1/32
set interfaces lo0 unit 1 family inet address 10.100.1.1/32
set protocols rsvp interface fe-1/2/0.0
set protocols rsvp interface fe-1/2/1.2
set protocols rsvp interface fe-1/2/2.14
set protocols mpls label-switched-path PE1-to-P1 to 10.9.9.2
set protocols mpls label-switched-path PE1-to-P2 to 10.9.9.3
set protocols mpls interface fe-1/2/0.0
set protocols mpls interface fe-1/2/1.2
set protocols mpls interface fe-1/2/2.14
set protocols bgp group internal type internal
set protocols bgp group internal local-address 10.9.9.1
set protocols bgp group internal family inet labeled-unicast aigp
set protocols bgp group internal export SET_EXPORT_ROUTES
set protocols bgp group internal vpn-apply-export
set protocols bgp group internal neighbor 10.9.9.4
set protocols bgp group internal neighbor 10.9.9.2
set protocols bgp group internal neighbor 10.9.9.3
set protocols bgp group external type external
set protocols bgp group external family inet labeled-unicast aigp
set protocols bgp group external export SET_EXPORT_ROUTES
set protocols bgp group external peer-as 7019
set protocols bgp group external neighbor 10.0.0.10
set protocols ospf area 0.0.0.1 interface fe-1/2/0.0 metric 1
set protocols ospf area 0.0.0.1 interface fe-1/2/1.2 metric 1
set protocols ospf area 0.0.0.1 interface 10.9.9.1 passive
set protocols ospf area 0.0.0.1 interface 10.9.9.1 metric 1
set protocols ospf area 0.0.0.1 interface 10.100.1.1 passive
set protocols ospf area 0.0.0.1 interface 10.100.1.1 metric 1
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol direct
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp
set policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.1
set policy-options policy-statement SET_EXPORT_ROUTES term 10 then accept
set routing-options router-id 10.9.9.1
set routing-options autonomous-system 13979

デバイスPE2

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 11 description PE2-to-PE4
set interfaces fe-1/2/0 unit 11 family inet address 10.0.0.22/30
set interfaces fe-1/2/0 unit 11 family mpls
set interfaces lo0 unit 9 family inet address 10.9.9.5/32 primary
set interfaces lo0 unit 9 family inet address 10.100.1.5/32
set protocols rsvp interface fe-1/2/0.11
set protocols mpls label-switched-path PE2-to-PE4 to 10.9.9.4
set protocols mpls interface fe-1/2/0.11
set protocols bgp group external type external
set protocols bgp group external multihop ttl 2
set protocols bgp group external local-address 10.9.9.5
set protocols bgp group external family inet labeled-unicast aigp
set protocols bgp group external export next-hop
set protocols bgp group external export aigp
set protocols bgp group external export SET_EXPORT_ROUTES
set protocols bgp group external vpn-apply-export
set protocols bgp group external peer-as 13979
set protocols bgp group external neighbor 10.9.9.4
set protocols ospf area 0.0.0.2 interface 10.9.9.5 passive
set protocols ospf area 0.0.0.2 interface 10.9.9.5 metric 1
set protocols ospf area 0.0.0.2 interface 10.100.1.5 passive
set protocols ospf area 0.0.0.2 interface 10.100.1.5 metric 1
set protocols ospf area 0.0.0.2 interface fe-1/2/0.11 metric 1
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol direct
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol static
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp
set policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.5
set policy-options policy-statement SET_EXPORT_ROUTES term 10 then accept
set policy-options policy-statement aigp term 10 from route-filter 55.0.0.0/24 exact
set policy-options policy-statement aigp term 10 then aigp-originate distance 20
set policy-options policy-statement aigp term 10 then next-hop 10.100.1.5
set policy-options policy-statement aigp term 10 then accept
set policy-options policy-statement aigp term 20 from route-filter 99.0.0.0/24 exact
set policy-options policy-statement aigp term 20 then aigp-originate distance 30
set policy-options policy-statement aigp term 20 then next-hop 10.100.1.5
set policy-options policy-statement aigp term 20 then accept
set policy-options policy-statement next-hop term 10 from protocol bgp
set policy-options policy-statement next-hop term 10 then next-hop 10.100.1.5
set policy-options policy-statement next-hop term 10 then accept
set policy-options policy-statement next-hop term 20 from protocol direct
set policy-options policy-statement next-hop term 20 from route-filter 10.9.9.5/32 exact
set policy-options policy-statement next-hop term 20 from route-filter 10.100.1.5/32 exact
set policy-options policy-statement next-hop term 20 then next-hop 10.100.1.5
set policy-options policy-statement next-hop term 20 then accept
set routing-options static route 99.0.0.0/24 discard
set routing-options static route 55.0.0.0/24 discard
set routing-options router-id 10.9.9.5
set routing-options autonomous-system 7018

デバイスPE3

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 13 description PE3-to-PE4
set interfaces fe-1/2/0 unit 13 family inet address 10.0.0.26/30
set interfaces fe-1/2/0 unit 13 family mpls
set interfaces lo0 unit 11 family inet address 10.9.9.6/32
set interfaces lo0 unit 11 family inet address 10.100.1.6/32
set protocols rsvp interface fe-1/2/0.13
set protocols mpls label-switched-path PE3-to-PE4 to 10.9.9.4
set protocols mpls interface fe-1/2/0.13
set protocols bgp group external type external
set protocols bgp group external multihop ttl 2
set protocols bgp group external local-address 10.9.9.6
set protocols bgp group external family inet labeled-unicast aigp
set protocols bgp group external export next-hop
set protocols bgp group external export SET_EXPORT_ROUTES
set protocols bgp group external vpn-apply-export
set protocols bgp group external peer-as 13979
set protocols bgp group external neighbor 10.9.9.4
set protocols ospf area 0.0.0.3 interface 10.9.9.6 passive
set protocols ospf area 0.0.0.3 interface 10.9.9.6 metric 1
set protocols ospf area 0.0.0.3 interface 10.100.1.6 passive
set protocols ospf area 0.0.0.3 interface 10.100.1.6 metric 1
set protocols ospf area 0.0.0.3 interface fe-1/2/0.13 metric 1
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol direct
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol static
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp
set policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.6
set policy-options policy-statement SET_EXPORT_ROUTES term 10 then accept
set policy-options policy-statement next-hop term 10 from protocol bgp
set policy-options policy-statement next-hop term 10 then next-hop 10.100.1.6
set policy-options policy-statement next-hop term 10 then accept
set policy-options policy-statement next-hop term 20 from protocol direct
set policy-options policy-statement next-hop term 20 from route-filter 10.9.9.6/32 exact
set policy-options policy-statement next-hop term 20 from route-filter 10.100.1.6/32 exact
set policy-options policy-statement next-hop term 20 then next-hop 10.100.1.6
set policy-options policy-statement next-hop term 20 then accept
set routing-options router-id 10.9.9.6
set routing-options autonomous-system 7018

デバイスPE7

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 15 description PE7-to-PE1
set interfaces fe-1/2/0 unit 15 family inet address 10.0.0.10/30
set interfaces lo0 unit 13 family inet address 10.9.9.7/32
set interfaces lo0 unit 13 family inet address 10.100.1.7/32
set protocols bgp group external type external
set protocols bgp group external family inet labeled-unicast aigp
set protocols bgp group external export SET_EXPORT_ROUTES
set protocols bgp group external peer-as 13979
set protocols bgp group external neighbor 10.0.0.9
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol direct
set policy-options policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp
set policy-options policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.7
set policy-options policy-statement SET_EXPORT_ROUTES term 10 then accept
set routing-options router-id 10.9.9.7
set routing-options autonomous-system 7019

デバイス P1 の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

デバイス P1 を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@P1# set fe-1/2/0 unit 1 description P1-to-PE1
    user@P1# set fe-1/2/0 unit 1 family inet address 10.0.0.2/30
    user@P1# set fe-1/2/0 unit 1 family mpls
    user@P1# set fe-1/2/1 unit 4 description P1-to-P2
    user@P1# set fe-1/2/1 unit 4 family inet address 10.0.0.29/30
    user@P1# set fe-1/2/1 unit 4 family mpls
    user@P1# set fe-1/2/2 unit 8 description P1-to-PE4
    user@P1# set fe-1/2/2 unit 8 family inet address 10.0.0.17/30
    user@P1# set fe-1/2/2 unit 8 family mpls
    user@P1# set lo0 unit 3 family inet address 10.9.9.2/32
    user@P1# set lo0 unit 3 family inet address 10.100.1.2/32
    
  2. MPLS と、RSVP や LDP などのシグナリング プロトコルを設定します。

    content_copy zoom_out_map
    [edit protocols]
    user@P1# set rsvp interface fe-1/2/0.1
    user@P1# set rsvp interface fe-1/2/2.8
    user@P1# set rsvp interface fe-1/2/1.4
    user@P1# set mpls label-switched-path P1-to-P2 to 10.9.9.3
    user@P1# set mpls label-switched-path P1-to-PE1 to 10.9.9.1
    user@P1# set mpls label-switched-path P1-to-PE4 to 10.9.9.4
    user@P1# set mpls interface fe-1/2/0.1
    user@P1# set mpls interface fe-1/2/2.8
    user@P1# set mpls interface fe-1/2/1.4
    
  3. BGP を設定します。

    content_copy zoom_out_map
    [edit protocols bgp group internal]
    user@P1# set type internal
    user@P1# set local-address 10.9.9.2
    user@P1# set neighbor 10.9.9.1
    user@P1# set neighbor 10.9.9.3
    user@P1# set neighbor 10.9.9.4
    
  4. AIGPを有効にします。

    content_copy zoom_out_map
    [edit protocols bgp group internal]
    user@P1# set family inet labeled-unicast aigp
    
  5. OSPF、RIP、IS-IS などの IGP を設定します。

    content_copy zoom_out_map
    [edit protocols ospf]
    user@P1# set area 0.0.0.1 interface fe-1/2/0.1 metric 1
    user@P1# set area 0.0.0.1 interface fe-1/2/1.4 metric 1
    user@P1# set area 0.0.0.0 interface fe-1/2/2.8 metric 1
    user@P1# set area 0.0.0.0 interface 10.9.9.2 passive
    user@P1# set area 0.0.0.0 interface 10.9.9.2 metric 1
    user@P1# set area 0.0.0.0 interface 10.100.1.2 passive
    user@P1# set area 0.0.0.0 interface 10.100.1.2 metric 1
    
  6. ルーター ID と自律システム番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@P1# set router-id 10.9.9.2
    user@P1# set autonomous-system 13979
    
  7. デバイスの設定が完了したら、設定をコミットします。

    content_copy zoom_out_map
    user@P1# commit
    
結果

コンフィギュレーションモードから、show interfacesshow protocols、、およびの各コマshow routing-optionsンドを入力し、コンフィギュレーションを確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@P1# show interfaces
fe-1/2/0 {
    unit 1 {
        description P1-to-PE1;
        family inet {
            address 10.0.0.2/30;
        }
        family mpls;
    }
}
fe-1/2/1 {
    unit 4 {
        description P1-to-P2;
        family inet {
            address 10.0.0.29/30;
        }
        family mpls;
    }
}
fe-1/2/2 {
    unit 8 {
        description P1-to-PE4;
        family inet {
            address 10.0.0.17/30;
        }
        family mpls;
    }
}
lo0 {
    unit 3 {
        family inet {
            address 10.9.9.2/32;
            address 10.100.1.2/32;
        }
    }
}
content_copy zoom_out_map
user@P1# show protocols
rsvp {
    interface fe-1/2/0.1;
    interface fe-1/2/2.8;
    interface fe-1/2/1.4;
}
mpls {
    label-switched-path P1-to-P2 {
        to 10.9.9.3;
    }
    label-switched-path P1-to-PE1 {
        to 10.9.9.1;
    }
    label-switched-path P1-to-PE4 {
        to 10.9.9.4;
    }
    interface fe-1/2/0.1;
    interface fe-1/2/2.8;
    interface fe-1/2/1.4;
}
bgp {
    group internal {
        type internal;
        local-address 10.9.9.2;
        family inet {
            labeled-unicast {
                aigp;
            }
        }
        neighbor 10.9.9.1;
        neighbor 10.9.9.3;
        neighbor 10.9.9.4;
    }
}
ospf {
    area 0.0.0.1 {
        interface fe-1/2/0.1 {
            metric 1;
        }
        interface fe-1/2/1.4 {
            metric 1;
        }
    }
    area 0.0.0.0 {
        interface fe-1/2/2.8 {
            metric 1;
        }
        interface 10.9.9.2 {
            passive;
            metric 1;
        }
        interface 10.100.1.2 {
            passive;
            metric 1;
        }
    }
}
content_copy zoom_out_map
user@P1# show routing-options
router-id 10.9.9.2;
autonomous-system 13979;

デバイス P2 の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

デバイスP2を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@P2# set fe-1/2/0 unit 3 description P2-to-PE1
    user@P2# set fe-1/2/0 unit 3 family inet address 10.0.0.6/30
    user@P2# set fe-1/2/0 unit 3 family mpls
    user@P2# set fe-1/2/1 unit 5 description P2-to-P1
    user@P2# set fe-1/2/1 unit 5 family inet address 10.0.0.30/30
    user@P2# set fe-1/2/1 unit 5 family mpls
    user@P2# set fe-1/2/2 unit 6 description P2-to-PE4
    user@P2# set fe-1/2/2 unit 6 family inet address 10.0.0.13/30
    user@P2# set fe-1/2/2 unit 6 family mpls
    user@P2# set lo0 unit 5 family inet address 10.9.9.3/32
    user@P2# set lo0 unit 5 family inet address 10.100.1.3/32
    
  2. MPLS と、RSVP や LDP などのシグナリング プロトコルを設定します。

    content_copy zoom_out_map
    [edit protocols]
    user@P2# set rsvp interface fe-1/2/1.5
    user@P2# set rsvp interface fe-1/2/2.6
    user@P2# set rsvp interface fe-1/2/0.3
    user@P2# set mpls label-switched-path P2-to-PE1 to 10.9.9.1
    user@P2# set mpls label-switched-path P2-to-P1 to 10.9.9.2
    user@P2# set mpls label-switched-path P2-to-PE4 to 10.9.9.4
    user@P2# set mpls interface fe-1/2/1.5
    user@P2# set mpls interface fe-1/2/2.6
    user@P2# set mpls interface fe-1/2/0.3
    
  3. BGP を設定します。

    content_copy zoom_out_map
    [edit protocols bgp group internal]
    user@P2# set type internal
    user@P2# set local-address 10.9.9.3
    user@P2# set neighbor 10.9.9.1
    user@P2# set neighbor 10.9.9.2
    user@P2# set neighbor 10.9.9.4
    
  4. AIGPを有効にします。

    content_copy zoom_out_map
    [edit protocols bgp group internal]
    user@P2# set family inet labeled-unicast aigp
    
  5. OSPF、RIP、IS-IS などの IGP を設定します。

    content_copy zoom_out_map
    [edit protocols ospf]
    user@P2# set area 0.0.0.0 interface fe-1/2/2.6 metric 1
    user@P2# set area 0.0.0.0 interface 10.9.9.3 passive
    user@P2# set area 0.0.0.0 interface 10.9.9.3 metric 1
    user@P2# set area 0.0.0.0 interface 10.100.1.3 passive
    user@P2# set area 0.0.0.0 interface 10.100.1.3 metric 1
    
  6. ルーター ID と自律システム番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@P2# set router-id 10.9.9.3
    user@P2# set autonomous-system 13979
    
  7. デバイスの設定が完了したら、設定をコミットします。

    content_copy zoom_out_map
    user@P2# commit
    
結果

コンフィギュレーションモードから、show interfacesshow protocols、、およびの各コマshow routing-optionsンドを入力し、コンフィギュレーションを確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@P2# show interfaces
fe-1/2/0 {
    unit 3 {
        description P2-to-PE1;
        family inet {
            address 10.0.0.6/30;
        }
        family mpls;
    }
}
fe-1/2/1 {
    unit 5 {
        description P2-to-P1;
        family inet {
            address 10.0.0.30/30;
        }
        family mpls;
    }
}
fe-1/2/2 {
    unit 6 {
        description P2-to-PE4;
        family inet {
            address 10.0.0.13/30;
        }
        family mpls;
    }
}
lo0 {
    unit 5 {
        family inet {
            address 10.9.9.3/32;
            address 10.100.1.3/32;
        }
    }
}
content_copy zoom_out_map
user@P2# show protocols
rsvp {
    interface fe-1/2/1.5;
    interface fe-1/2/2.6;
    interface fe-1/2/0.3;
}
mpls {
    label-switched-path P2-to-PE1 {
        to 10.9.9.1;
    }
    label-switched-path P2-to-P1 {
        to 10.9.9.2;
    }
    label-switched-path P2-to-PE4 {
        to 10.9.9.4;
    }
    interface fe-1/2/1.5;
    interface fe-1/2/2.6;
    interface fe-1/2/0.3;
}
bgp {
    group internal {
        type internal;
        local-address 10.9.9.3;
        family inet {
            labeled-unicast {
                aigp;
            }
        }
        neighbor 10.9.9.1;
        neighbor 10.9.9.2;
        neighbor 10.9.9.4;
    }
}
ospf {
    area 0.0.0.0 {
        interface fe-1/2/2.6 {
            metric 1;
        }
        interface 10.9.9.3 {
            passive;
            metric 1;
        }
        interface 10.100.1.3 {
            passive;
            metric 1;
        }
    }
}
content_copy zoom_out_map
user@P2# show routing-options
router-id 10.9.9.3;
autonomous-system 13979;

デバイスPE4の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

PE4を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@PE4# set fe-1/2/0 unit 7 description PE4-to-P2
    user@PE4# set fe-1/2/0 unit 7 family inet address 10.0.0.14/30
    user@PE4# set fe-1/2/0 unit 7 family mpls
    user@PE4# set fe-1/2/1 unit 9 description PE4-to-P1
    user@PE4# set fe-1/2/1 unit 9 family inet address 10.0.0.18/30
    user@PE4# set fe-1/2/1 unit 9 family mpls
    user@PE4# set fe-1/2/2 unit 10 description PE4-to-PE2
    user@PE4# set fe-1/2/2 unit 10 family inet address 10.0.0.21/30
    user@PE4# set fe-1/2/2 unit 10 family mpls
    user@PE4# set fe-1/0/2 unit 12 description PE4-to-PE3
    user@PE4# set fe-1/0/2 unit 12 family inet address 10.0.0.25/30
    user@PE4# set fe-1/0/2 unit 12 family mpls
    user@PE4# set lo0 unit 7 family inet address 10.9.9.4/32
    user@PE4# set lo0 unit 7 family inet address 10.100.1.4/32
    
  2. MPLS と、RSVP や LDP などのシグナリング プロトコルを設定します。

    content_copy zoom_out_map
    [edit protocols]
    user@PE4# set rsvp interface fe-1/2/0.7
    user@PE4# set rsvp interface fe-1/2/1.9
    user@PE4# set rsvp interface fe-1/2/2.10
    user@PE4# set rsvp interface fe-1/0/2.12
    user@PE4# set mpls label-switched-path PE4-to-PE2 to 10.9.9.5
    user@PE4# set mpls label-switched-path PE4-to-PE3 to 10.9.9.6
    user@PE4# set mpls label-switched-path PE4-to-P1 to 10.9.9.2
    user@PE4# set mpls label-switched-path PE4-to-P2 to 10.9.9.3
    user@PE4# set mpls interface fe-1/2/0.7
    user@PE4# set mpls interface fe-1/2/1.9
    user@PE4# set mpls interface fe-1/2/2.10
    user@PE4# set mpls interface fe-1/0/2.12
    
  3. BGP を設定します。

    content_copy zoom_out_map
    [edit protocols bgp]
    user@PE4# set export next-hop
    user@PE4# set export aigp
    user@PE4# set group internal type internal
    user@PE4# set group internal local-address 10.9.9.4
    user@PE4# set group internal neighbor 10.9.9.1
    user@PE4# set group internal neighbor 10.9.9.3
    user@PE4# set group internal neighbor 10.9.9.2
    user@PE4# set group external type external
    user@PE4# set group external multihop ttl 2
    user@PE4# set group external local-address 10.9.9.4
    user@PE4# set group external peer-as 7018
    user@PE4# set group external neighbor 10.9.9.5
    user@PE4# set group external neighbor 10.9.9.6
    
  4. AIGPを有効にします。

    content_copy zoom_out_map
    [edit protocols bgp]
    user@PE4# set group external family inet labeled-unicast aigp
    user@PE4# set group internal family inet labeled-unicast aigp
    
  5. プレフィックスを生成し、AIGP距離を設定します。

    デフォルトでは、プレフィックスは現在の IGP 距離を使用して発信されます。オプションで、次に示すように、[ distance ] オプションを使用して AIGP 属性の距離を構成できます。

    content_copy zoom_out_map
    [edit policy-options policy-statement aigp term 10]
    user@PE4# set from protocol static
    user@PE4# set from route-filter 44.0.0.0/24 exact
    user@PE4# set then aigp-originate distance 200
    user@PE4# set then next-hop 10.100.1.4
    user@PE4# set then accept
    
  6. ポリシーを有効にします。

    content_copy zoom_out_map
    [edit policy-options policy-statement next-hop]
    user@PE4# set term 10 from protocol bgp
    user@PE4# set term 10 then next-hop 10.100.1.4
    user@PE4# set term 10 then accept
    user@PE4# set term 20 from protocol direct
    user@PE4# set term 20 from route-filter 10.9.9.4/32 exact
    user@PE4# set term 20 from route-filter 10.100.1.4/32 exact
    user@PE4# set term 20 then next-hop 10.100.1.4
    user@PE4# set term 20 then accept
    
  7. スタティック ルートを構成します。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE4# set static route 44.0.0.0/24 discard
    
  8. OSPF、RIP、IS-IS などの IGP を設定します。

    content_copy zoom_out_map
    [edit protocols ospf]
    user@PE4# set area 0.0.0.0 interface fe-1/2/1.9 metric 1
    user@PE4# set area 0.0.0.0 interface fe-1/2/0.7 metric 1
    user@PE4# set area 0.0.0.0 interface 10.9.9.4 passive
    user@PE4# set area 0.0.0.0 interface 10.9.9.4 metric 1
    user@PE4# set area 0.0.0.0 interface 10.100.1.4 passive
    user@PE4# set area 0.0.0.0 interface 10.100.1.4 metric 1
    user@PE4# set area 0.0.0.2 interface fe-1/2/2.10 metric 1
    user@PE4# set area 0.0.0.3 interface fe-1/0/2.12 metric 1
    
  9. ルーター ID と自律システム番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE4# set router-id 10.9.9.4
    user@PE4# set autonomous-system 13979
    
  10. デバイスの設定が完了したら、設定をコミットします。

    content_copy zoom_out_map
    user@PE4# commit
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@PE4# show interfaces
fe-1/0/2 {
    unit 12 {
        description PE4-to-PE3;
        family inet {
            address 10.0.0.25/30;
        }
        family mpls;
    }
}
fe-1/2/0 {
    unit 7 {
        description PE4-to-P2;
        family inet {
            address 10.0.0.14/30;
        }
        family mpls;
    }
}
fe-1/2/1 {
    unit 9 {
        description PE4-to-P1;
        family inet {
            address 10.0.0.18/30;
        }
        family mpls;
    }
}
fe-1/2/2 {
    unit 10 {
        description PE4-to-PE2;
        family inet {
            address 10.0.0.21/30;
        }
        family mpls;
    }
}
lo0 {
    unit 7 {
        family inet {
            address 10.9.9.4/32;
            address 10.100.1.4/32;
        }
    }
}
content_copy zoom_out_map
user@PE4# show policy-options
policy-statement aigp {
    term 10 {
        from {
            protocol static;
            route-filter 44.0.0.0/24 exact;
        }
        then {
            aigp-originate distance 200;
            next-hop 10.100.1.4;
            accept;
        }
    }
}
policy-statement next-hop {
    term 10 {
        from protocol bgp;
        then {
            next-hop 10.100.1.4;
            accept;
        }
    }
    term 20 {
        from {
            protocol direct;
            route-filter 10.9.9.4/32 exact;
            route-filter 10.100.1.4/32 exact;
        }
        then {
            next-hop 10.100.1.4;
            accept;
        }
    }
}
content_copy zoom_out_map
user@PE4# show protocols
rsvp {
    interface fe-1/2/0.7;
    interface fe-1/2/1.9;
    interface fe-1/2/2.10;
    interface fe-1/0/2.12;
}
mpls {
    label-switched-path PE4-to-PE2 {
        to 10.9.9.5;
    }
    label-switched-path PE4-to-PE3 {
        to 10.9.9.6;
    }
    label-switched-path PE4-to-P1 {
        to 10.9.9.2;
    }
    label-switched-path PE4-to-P2 {
        to 10.9.9.3;
    }
    interface fe-1/2/0.7;
    interface fe-1/2/1.9;
    interface fe-1/2/2.10;
    interface fe-1/0/2.12;
}
bgp {
    export [ next-hop aigp ];
    group internal {
        type internal;
        local-address 10.9.9.4;
        family inet {
            labeled-unicast {
                aigp;
            }
        }
        neighbor 10.9.9.1;
        neighbor 10.9.9.3;
        neighbor 10.9.9.2;
    }
    group external {
        type external;
        multihop {
            ttl 2;
        }
        local-address 10.9.9.4;
        family inet {
            labeled-unicast {
                aigp;
            }
        }
        peer-as 7018;
        neighbor 10.9.9.5;
        neighbor 10.9.9.6;
    }
}
ospf {
    area 0.0.0.0 {
        interface fe-1/2/1.9 {
            metric 1;
        }
        interface fe-1/2/0.7 {
            metric 1;
        }
        interface 10.9.9.4 {
            passive;
            metric 1;
        }
        interface 10.100.1.4 {
            passive;
            metric 1;
        }
    }
    area 0.0.0.2 {
        interface fe-1/2/2.10 {
            metric 1;
        }
    }
    area 0.0.0.3 {
        interface fe-1/0/2.12 {
            metric 1;
        }
    }
}
content_copy zoom_out_map
user@PE4# show routing-options
static {
    route 44.0.0.0/24 discard;
}
router-id 10.9.9.4;
autonomous-system 13979;

デバイスPE1の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

デバイスPE1を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@PE1# set fe-1/2/0 unit 0 description PE1-to-P1
    user@PE1# set fe-1/2/0 unit 0 family inet address 10.0.0.1/30
    user@PE1# set fe-1/2/0 unit 0 family mpls
    user@PE1# set fe-1/2/1 unit 2 description PE1-to-P2
    user@PE1# set fe-1/2/1 unit 2 family inet address 10.0.0.5/30
    user@PE1# set fe-1/2/1 unit 2 family mpls
    user@PE1# set fe-1/2/2 unit 14 description PE1-to-PE7
    user@PE1# set fe-1/2/2 unit 14 family inet address 10.0.0.9/30
    user@PE1# set lo0 unit 1 family inet address 10.9.9.1/32
    user@PE1# set lo0 unit 1 family inet address 10.100.1.1/32
    
  2. MPLS と、RSVP や LDP などのシグナリング プロトコルを設定します。

    content_copy zoom_out_map
    [edit protocols]
    user@PE1# set rsvp interface fe-1/2/0.0
    user@PE1# set rsvp interface fe-1/2/1.2
    user@PE1# set rsvp interface fe-1/2/2.14
    user@PE1# set mpls label-switched-path PE1-to-P1 to 10.9.9.2
    user@PE1# set mpls label-switched-path PE1-to-P2 to 10.9.9.3
    user@PE1# set mpls interface fe-1/2/0.0
    user@PE1# set mpls interface fe-1/2/1.2
    user@PE1# set mpls interface fe-1/2/2.14
    
  3. BGP を設定します。

    content_copy zoom_out_map
    [edit protocols bgp]
    user@PE1# set group internal type internal
    user@PE1# set group internal local-address 10.9.9.1
    user@PE1# set group internal export SET_EXPORT_ROUTES
    user@PE1# set group internal vpn-apply-export
    user@PE1# set group internal neighbor 10.9.9.4
    user@PE1# set group internal neighbor 10.9.9.2
    user@PE1# set group internal neighbor 10.9.9.3
    user@PE1# set group external type external
    user@PE1# set group external export SET_EXPORT_ROUTES
    user@PE1# set group external peer-as 7019
    user@PE1# set group external neighbor 10.0.0.10
    
  4. AIGPを有効にします。

    content_copy zoom_out_map
    [edit protocols bgp]
    user@PE1# set group internal family inet labeled-unicast aigp
    user@PE1# set group external family inet labeled-unicast aigp
    
  5. ポリシーを有効にします。

    content_copy zoom_out_map
    [edit policy-options policy-statement SET_EXPORT_ROUTES term 10]
    user@PE1# set from protocol direct
    user@PE1# set from protocol bgp
    user@PE1# set then next-hop 10.100.1.1
    user@PE1# set then accept
    
  6. OSPF、RIP、IS-IS などの IGP を設定します。

    content_copy zoom_out_map
    [edit protocols ospf area 0.0.0.1]
    user@PE1# set interface fe-1/2/0.0 metric 1
    user@PE1# set interface fe-1/2/1.2 metric 1
    user@PE1# set interface 10.9.9.1 passive
    user@PE1# set interface 10.9.9.1 metric 1
    user@PE1# set interface 10.100.1.1 passive
    user@PE1# set interface 10.100.1.1 metric 1
    
  7. ルーター ID と自律システム番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE1# set router-id 10.9.9.1
    user@PE1# set autonomous-system 13979
    
  8. デバイスの設定が完了したら、設定をコミットします。

    content_copy zoom_out_map
    user@PE1# commit
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@PE1# show interfaces
fe-1/2/0 {
    unit 0 {
        description PE1-to-P1;
        family inet {
            address 10.0.0.1/30;
        }
        family mpls;
    }
}
fe-1/2/1 {
    unit 2 {
        description PE1-to-P2;
        family inet {
            address 10.0.0.5/30;
        }
        family mpls;
    }
}
fe-1/2/2 {
    unit 14 {
        description PE1-to-PE7;
        family inet {
            address 10.0.0.9/30;
        }
    }
}
lo0 {
    unit 1 {
        family inet {
            address 10.9.9.1/32;
            address 10.100.1.1/32;
        }
    }
}
content_copy zoom_out_map
user@PE1# show policy-options
policy-statement SET_EXPORT_ROUTES {
    term 10 {
        from protocol [ direct bgp ];
        then {
            next-hop 10.100.1.1;
            accept;
        }
    }
}
content_copy zoom_out_map
user@PE1# show protocols
rsvp {
    interface fe-1/2/0.0;
    interface fe-1/2/1.2;
    interface fe-1/2/2.14;
}
mpls {
    label-switched-path PE1-to-P1 {
        to 10.9.9.2;
    }
    label-switched-path PE1-to-P2 {
        to 10.9.9.3;
    }
    interface fe-1/2/0.0;
    interface fe-1/2/1.2;
    interface fe-1/2/2.14;
}
bgp {
    group internal {
        type internal;
        local-address 10.9.9.1;
        family inet {
            labeled-unicast {
                aigp;
            }
        }
        export SET_EXPORT_ROUTES;
        vpn-apply-export;
        neighbor 10.9.9.4;
        neighbor 10.9.9.2;
        neighbor 10.9.9.3;
    }
    group external {
        type external;
        family inet {
            labeled-unicast {
                aigp;
            }
        }
        export SET_EXPORT_ROUTES;
        peer-as 7019;
        neighbor 10.0.0.10;
    }
}
ospf {
    area 0.0.0.1 {
        interface fe-1/2/0.0 {
            metric 1;
        }
        interface fe-1/2/1.2 {
            metric 1;
        }
        interface 10.9.9.1 {
            passive;
            metric 1;
        }
        interface 10.100.1.1 {
            passive;
            metric 1;
        }
    }
}
content_copy zoom_out_map
user@PE1# show routing-options
router-id 10.9.9.1;
autonomous-system 13979;

デバイスPE2の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

PE2を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@PE2# set fe-1/2/0 unit 11 description PE2-to-PE4
    user@PE2# set fe-1/2/0 unit 11 family inet address 10.0.0.22/30
    user@PE2# set fe-1/2/0 unit 11 family mpls
    user@PE2# set lo0 unit 9 family inet address 10.9.9.5/32 primary
    user@PE2# set lo0 unit 9 family inet address 10.100.1.5/32
    
  2. MPLS と、RSVP や LDP などのシグナリング プロトコルを設定します。

    content_copy zoom_out_map
    [edit protocols]
    user@PE2# set rsvp interface fe-1/2/0.11
    user@PE2# set mpls label-switched-path PE2-to-PE4 to 10.9.9.4
    user@PE2# set mpls interface fe-1/2/0.11
    
  3. BGP を設定します。

    content_copy zoom_out_map
    [edit protocols bgp]
    user@PE2# set group external type external
    user@PE2# set group external multihop ttl 2
    user@PE2# set group external local-address 10.9.9.5
    user@PE2# set group external export next-hop
    user@PE2# set group external export aigp
    user@PE2# set group external export SET_EXPORT_ROUTES
    user@PE2# set group external vpn-apply-export
    user@PE2# set group external peer-as 13979
    user@PE2# set group external neighbor 10.9.9.4
    
  4. AIGPを有効にします。

    content_copy zoom_out_map
    [edit protocols bgp]
    user@PE2# set group external family inet labeled-unicast aigp
    
  5. プレフィックスを生成し、AIGP距離を設定します。

    デフォルトでは、プレフィックスは現在の IGP 距離を使用して発信されます。オプションで、次に示すように、[ distance ] オプションを使用して AIGP 属性の距離を構成できます。

    content_copy zoom_out_map
    [edit policy-options policy-statement aigp]
    user@PE2# set term 10 from route-filter 55.0.0.0/24 exact
    user@PE2# set term 10 then aigp-originate distance 20
    user@PE2# set term 10 then next-hop 10.100.1.5
    user@PE2# set term 10 then accept
    user@PE2# set term 20 from route-filter 99.0.0.0/24 exact
    user@PE2# set term 20 then aigp-originate distance 30
    user@PE2# set term 20 then next-hop 10.100.1.5
    user@PE2# set term 20 then accept
    
  6. ポリシーを有効にします。

    content_copy zoom_out_map
    [edit policy-options]
    user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 from protocol direct
    user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 from protocol static
    user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp
    user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.5
    user@PE2# set policy-statement SET_EXPORT_ROUTES term 10 then accept
    user@PE2# set policy-statement next-hop term 10 from protocol bgp
    user@PE2# set policy-statement next-hop term 10 then next-hop 10.100.1.5
    user@PE2# set policy-statement next-hop term 10 then accept
    user@PE2# set policy-statement next-hop term 20 from protocol direct
    user@PE2# set policy-statement next-hop term 20 from route-filter 10.9.9.5/32 exact
    user@PE2# set policy-statement next-hop term 20 from route-filter 10.100.1.5/32 exact
    user@PE2# set policy-statement next-hop term 20 then next-hop 10.100.1.5
    user@PE2# set policy-statement next-hop term 20 then accept
    
  7. いくつかのスタティックルートを有効にします。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE2# set static route 99.0.0.0/24 discard
    user@PE2# set static route 55.0.0.0/24 discard
    
  8. OSPF、RIP、IS-IS などの IGP を設定します。

    content_copy zoom_out_map
    [edit protocols ospf area 0.0.0.2]
    user@PE2# set interface 10.9.9.5 passive
    user@PE2# set interface 10.9.9.5 metric 1
    user@PE2# set interface 10.100.1.5 passive
    user@PE2# set interface 10.100.1.5 metric 1
    user@PE2# set interface fe-1/2/0.11 metric 1
    
  9. ルーター ID と自律システム番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE2# set router-id 10.9.9.5
    user@PE2# set autonomous-system 7018
    
  10. デバイスの設定が完了したら、設定をコミットします。

    content_copy zoom_out_map
    user@PE2# commit
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@PE2# show interfaces
fe-1/2/0 {
    unit 11 {
        description PE2-to-PE4;
        family inet {
            address 10.0.0.22/30;
        }
        family mpls;
    }
}
lo0 {
    unit 9 {
        family inet {
            address 10.9.9.5/32 {
                primary;
            }
            address 10.100.1.5/32;
        }
    }
}
content_copy zoom_out_map
user@PE2# show policy-options
policy-statement SET_EXPORT_ROUTES {
    term 10 {
        from protocol [ direct static bgp ];
        then {
            next-hop 10.100.1.5;
            accept;
        }
    }
}
policy-statement aigp {
    term 10 {
        from {
            route-filter 55.0.0.0/24 exact;
        }
        then {
            aigp-originate distance 20;
            next-hop 10.100.1.5;
            accept;
        }
    }
    term 20 {
        from {
            route-filter 99.0.0.0/24 exact;
        }
        then {
            aigp-originate distance 30;
            next-hop 10.100.1.5;
            accept;
        }
    }
}
policy-statement next-hop {
    term 10 {
        from protocol bgp;
        then {
            next-hop 10.100.1.5;
            accept;
        }
    }
    term 20 {
        from {
            protocol direct;
            route-filter 10.9.9.5/32 exact;
            route-filter 10.100.1.5/32 exact;
        }
        then {
            next-hop 10.100.1.5;
            accept;
        }
    }
}
content_copy zoom_out_map
user@PE2# show protocols
rsvp {
    interface fe-1/2/0.11;
}
mpls {
    label-switched-path PE2-to-PE4 {
        to 10.9.9.4;
    }
    interface fe-1/2/0.11;
}
bgp {
    group external {
        type external;
        multihop {
            ttl 2;
        }
        local-address 10.9.9.5;
        family inet {
            labeled-unicast {
                aigp;
            }
        }
        export [ next-hop aigp SET_EXPORT_ROUTES ];
        vpn-apply-export;
        peer-as 13979;
        neighbor 10.9.9.4;
    }
}
ospf {
    area 0.0.0.2 {
        interface 10.9.9.5 {
            passive;
            metric 1;
        }
        interface 10.100.1.5 {
            passive;
            metric 1;
        }
        interface fe-1/2/0.11 {
            metric 1;
        }
    }
}
content_copy zoom_out_map
user@PE2# show routing-options
static {
    route 99.0.0.0/24 discard;
    route 55.0.0.0/24 discard;
}
router-id 10.9.9.5;
autonomous-system 7018;

デバイスPE3の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

PE3を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@PE3# set fe-1/2/0 unit 13 description PE3-to-PE4
    user@PE3# set fe-1/2/0 unit 13 family inet address 10.0.0.26/30
    user@PE3# set fe-1/2/0 unit 13 family mpls
    user@PE3# set lo0 unit 11 family inet address 10.9.9.6/32
    user@PE3# set lo0 unit 11 family inet address 10.100.1.6/32
    
  2. MPLS と、RSVP や LDP などのシグナリング プロトコルを設定します。

    content_copy zoom_out_map
    [edit protocols]
    user@PE3# set rsvp interface fe-1/2/0.13
    user@PE3# set mpls label-switched-path PE3-to-PE4 to 10.9.9.4
    user@PE3# set mpls interface fe-1/2/0.13
    
  3. BGP を設定します。

    content_copy zoom_out_map
    [edit protocols bgp group external]
    user@PE3# set type external
    user@PE3# set multihop ttl 2
    user@PE3# set local-address 10.9.9.6
    user@PE3# set export next-hop
    user@PE3# set export SET_EXPORT_ROUTES
    user@PE3# set vpn-apply-export
    user@PE3# set peer-as 13979
    user@PE3# set neighbor 10.9.9.4
    
  4. AIGPを有効にします。

    content_copy zoom_out_map
    [edit protocols bgp group external]
    user@PE3# set family inet labeled-unicast aigp
    
  5. ポリシーを有効にします。

    content_copy zoom_out_map
    [edit policy-options]
    user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 from protocol direct
    user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 from protocol static
    user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 from protocol bgp
    user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 then next-hop 10.100.1.6
    user@PE3# set policy-statement SET_EXPORT_ROUTES term 10 then accept
    user@PE3# set policy-statement next-hop term 10 from protocol bgp
    user@PE3# set policy-statement next-hop term 10 then next-hop 10.100.1.6
    user@PE3# set policy-statement next-hop term 10 then accept
    user@PE3# set policy-statement next-hop term 20 from protocol direct
    user@PE3# set policy-statement next-hop term 20 from route-filter 10.9.9.6/32 exact
    user@PE3# set policy-statement next-hop term 20 from route-filter 10.100.1.6/32 exact
    user@PE3# set policy-statement next-hop term 20 then next-hop 10.100.1.6
    user@PE3# set policy-statement next-hop term 20 then accept
    
  6. OSPF、RIP、IS-IS などの IGP を設定します。

    content_copy zoom_out_map
    [edit protocols ospf area 0.0.0.3]
    user@PE3# set interface 10.9.9.6 passive
    user@PE3# set interface 10.9.9.6 metric 1
    user@PE3# set interface 10.100.1.6 passive
    user@PE3# set interface 10.100.1.6 metric 1
    user@PE3# set interface fe-1/2/0.13 metric 1
    
  7. ルーター ID と自律システム番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE3# set router-id 10.9.9.6
    user@PE3# set autonomous-system 7018
    
  8. デバイスの設定が完了したら、設定をコミットします。

    content_copy zoom_out_map
    user@PE3# commit
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@PE3# show interfaces
fe-1/2/0 {
    unit 13 {
        description PE3-to-PE4;
        family inet {
            address 10.0.0.26/30;
        }
        family mpls;
    }
}
lo0 {
    unit 11 {
        family inet {
            address 10.9.9.6/32;
            address 10.100.1.6/32;
        }
    }
}
content_copy zoom_out_map
user@PE3# show policy-options
policy-statement SET_EXPORT_ROUTES {
    term 10 {
        from protocol [ direct static bgp ];
        then {
            next-hop 10.100.1.6;
            accept;
        }
    }
}
policy-statement next-hop {
    term 10 {
        from protocol bgp;
        then {
            next-hop 10.100.1.6;
            accept;
        }
    }
    term 20 {
        from {
            protocol direct;
            route-filter 10.9.9.6/32 exact;
            route-filter 10.100.1.6/32 exact;
        }
        then {
            next-hop 10.100.1.6;
            accept;
        }
    }
}
content_copy zoom_out_map
user@PE3# show protocols
rsvp {
    interface fe-1/2/0.13;
}
mpls {
    label-switched-path PE3-to-PE4 {
        to 10.9.9.4;
    }
    interface fe-1/2/0.13;
}
bgp {
    group external {
        type external;
        multihop {
            ttl 2;
        }
        local-address 10.9.9.6;
        family inet {
            labeled-unicast {
                aigp;
            }
        }
        export [ next-hop SET_EXPORT_ROUTES ];
        vpn-apply-export;
        peer-as 13979;
        neighbor 10.9.9.4;
    }
}
ospf {
    area 0.0.0.3 {
        interface 10.9.9.6 {
            passive;
            metric 1;
        }
        interface 10.100.1.6 {
            passive;
            metric 1;
        }
        interface fe-1/2/0.13 {
            metric 1;
        }
    }
}
content_copy zoom_out_map
user@PE3# show routing-options
router-id 10.9.9.6;
autonomous-system 7018;

デバイスPE7の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

PE7を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@PE7# set fe-1/2/0 unit 15 description PE7-to-PE1
    user@PE7# set fe-1/2/0 unit 15 family inet address 10.0.0.10/30
    user@PE7# set lo0 unit 13 family inet address 10.9.9.7/32
    user@PE7# set lo0 unit 13 family inet address 10.100.1.7/32
    
  2. BGP を設定します。

    content_copy zoom_out_map
    [edit protocols bgp group external]
    user@PE7# set type external
    user@PE7# set export SET_EXPORT_ROUTES
    user@PE7# set peer-as 13979
    user@PE7# set neighbor 10.0.0.9
    
  3. AIGPを有効にします。

    content_copy zoom_out_map
    [edit protocols bgp group external]
    user@PE7# set family inet labeled-unicast aigp
    
  4. ルーティングポリシーを設定します。

    content_copy zoom_out_map
    [edit policy-options policy-statement SET_EXPORT_ROUTES term 10]
    user@PE7# set from protocol direct
    user@PE7# set from protocol bgp
    user@PE7# set then next-hop 10.100.1.7
    user@PE7# set then accept
    
  5. ルーター ID と自律システム番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE7# set router-id 10.9.9.7
    user@PE7# set autonomous-system 7019
    
  6. デバイスの設定が完了したら、設定をコミットします。

    content_copy zoom_out_map
    user@PE7# commit
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@PE7# show interfaces
interfaces {
    fe-1/2/0 {
        unit 15 {
            description PE7-to-PE1;
            family inet {
                address 10.0.0.10/30;
            }
        }
    }
    lo0 {
        unit 13 {
            family inet {
                address 10.9.9.7/32;
                address 10.100.1.7/32;
            }
        }
    }
}
content_copy zoom_out_map
user@PE7# show policy-options
policy-statement SET_EXPORT_ROUTES {
    term 10 {
        from protocol [ direct bgp ];
        then {
            next-hop 10.100.1.7;
            accept;
        }
    }
}
content_copy zoom_out_map
user@PE7# show protocols
bgp {
    group external {
        type external;
        family inet {
            labeled-unicast {
                aigp;
            }
        }
        export SET_EXPORT_ROUTES;
        peer-as 13979;
        neighbor 10.0.0.9;
    }
}
content_copy zoom_out_map
user@PE7# show routing-options
router-id 10.9.9.7;
autonomous-system 7019;

検証

設定が正常に機能していることを確認します。

デバイス PE4 が EBGP ネイバー PE2 から AIGP 属性を受信していることの検証

目的

デバイス PE2 の AIGP ポリシーが機能していることを確認します。

アクション
content_copy zoom_out_map
user@PE4> show route receive-protocol bgp 10.9.9.5 extensive
* 55.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 299888
     Nexthop: 10.100.1.5
     AS path: 7018 I
     AIGP: 20

* 99.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 299888
     Nexthop: 10.100.1.5
     AS path: 7018 I
     AIGP: 30
意味

デバイス PE2 では、 aigp-originate ステートメントは 20(aigp-originate distance 20)の距離で設定されています。このステートメントは、ルート 55.0.0.0/24 に適用されます。同様に、 aigp-originate distance 30 ステートメントはルート 99.0.0.0/24 に適用されます。したがって、デバイス PE4 がこれらのルートを受信すると、AIGP 属性に設定されたメトリックが付加されます。

IGPメトリックの確認

目的

デバイス PE4 から、BGP ネクスト ホップ 10.100.1.5 への IGP メトリックを確認します。

アクション
content_copy zoom_out_map
user@PE4> show route 10.100.1.5
inet.0: 30 destinations, 40 routes (30 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.100.1.5/32      *[OSPF/10] 05:35:50, metric 2
                    > to 10.0.0.22 via fe-1/2/2.10
                    [BGP/170] 03:45:07, localpref 100, from 10.9.9.5
                      AS path: 7018 I
                    > to 10.0.0.22 via fe-1/2/2.10
意味

このルートのIGPメトリックは2です。

デバイスPE4がAIGP属性にIGPメトリックを追加することを確認する

目的

デバイス PE4 が IBGP ネイバーであるデバイス PE1 にルートを再アドバタイズするときに、IGP メトリックが AIGP 属性に追加されていることを確認します。

アクション
content_copy zoom_out_map
user@PE4> show route advertising-protocol bgp 10.9.9.1 extensive

* 55.0.0.0/24 (1 entry, 1 announced)
 BGP group internal type Internal
     Route Label: 300544
     Nexthop: 10.100.1.4
     Flags: Nexthop Change
     Localpref: 100
     AS path: [13979] 7018 I
     AIGP: 22

* 99.0.0.0/24 (1 entry, 1 announced)
 BGP group internal type Internal
     Route Label: 300544
     Nexthop: 10.100.1.4
     Flags: Nexthop Change
     Localpref: 100
     AS path: [13979] 7018 I
     AIGP: 32
意味

これらのルートのネクストホップが変更されるため、IGPメトリックがAIGPメトリック(20 + 2 = 22および30 + 2 = 32)に追加されます。

デバイス PE7 が EBGP ネイバー PE1 から AIGP 属性を受信していることの検証

目的

デバイス PE1 の AIGP ポリシーが機能していることを確認します。

アクション
content_copy zoom_out_map
user@PE7> show route receive-protocol bgp 10.0.0.9 extensive
* 44.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 300096
     Nexthop: 10.0.0.9
     AS path: 13979 I
     AIGP: 203

* 55.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 300112
     Nexthop: 10.0.0.9
     AS path: 13979 7018 I
     AIGP: 25

* 99.0.0.0/24 (1 entry, 1 announced)
     Accepted
     Route Label: 300112                
     Nexthop: 10.0.0.9
     AS path: 13979 7018 I
     AIGP: 35
意味

44.0.0.0/24ルートは、デバイスPE4から発信されています。55.0.0.0/24および99.0.0.0/24ルートは、デバイスPE2で発信されます。IGP 距離は、設定された AIGP 距離に追加されます。

解決中のAIGPメトリックの検証

目的

プレフィックスが再帰によって解決され、再帰的ネクストホップに AIGP メトリックがある場合、プレフィックスには再帰的 BGP ネクストホップ上の AIGP 値の合計があることを確認します。

アクション
  1. 66.0.0.0/24 へのスタティック ルートを追加します。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE2# set static route 66.0.0.0/24 discard
    
  2. デバイス PE2 の aigp ポリシー ステートメントの既存の条項を削除します。

    content_copy zoom_out_map
    [edit policy-options policy-statement aigp]
    user@PE2# delete term 10
    user@PE2# delete term 20
    
  3. 66.0.0.0 へのルートの再帰的なルート検索を構成します。

    ポリシーは、プレフィックス66.0.0.0/24(none)とその再帰的ネクストホップのAIGPメトリックを示しています。プレフィックス 66.0.0.0/24 は 55.0.0.1 によって解決されます。プレフィックス 66.0.0.0/24 には、発信される独自の AIGP メトリックはありませんが、再帰的ネクストホップである 55.0.0.1 には AIGP 値があります。

    content_copy zoom_out_map
    [edit policy-options policy-statement aigp]
    user@PE2# set term 10 from route-filter 55.0.0.1/24 exact 
    user@PE2# set term 10 then aigp-originate distance 20 
    user@PE2# set term 10 then next-hop 10.100.1.5 
    user@PE2# set term 10 then accept 
    user@PE2# set term 20 from route-filter 66.0.0.0/24 exact 
    user@PE2# set term 20 then next-hop 55.0.0.1 
    user@PE2# set term 20 then accept 
    
  4. デバイス PE4 で、 show route 55.0.0.0 extensive コマンドを実行します。

    Metric2の値は、BGPネクストホップに対するIGPメトリックです。デバイス PE4 がこれらのルートを IBGP ピアであるデバイス PE1 に再アドバタイズすると、AIGP メトリックは AIGP + その解決 AIGP メトリック + メトリック 2 の合計になります。

    プレフィックス55.0.0.0は、デバイスPE2によって定義およびアドバタイズされた独自のIGPメトリック20を示しています。再帰的なBGPネクストホップがないため、解決中のAIGP値は表示されません。メトリック 2 の値は 2 です。

    content_copy zoom_out_map
    user@PE4> show route 55.0.0.0 extensive
    inet.0: 31 destinations, 41 routes (31 active, 0 holddown, 0 hidden)
    55.0.0.0/24 (1 entry, 1 announced)
    TSI:
    KRT in-kernel 55.0.0.0/24 -> {indirect(262151)}
    Page 0 idx 0 Type 1 val 928d1b8
        Flags: Nexthop Change
        Nexthop: 10.100.1.4
        Localpref: 100
        AS path: [13979] 7018 I
        Communities:
        AIGP: 22
    Path 55.0.0.0 from 10.9.9.5 Vector len 4.  Val: 0
            *BGP    Preference: 170/-101
                    Next hop type: Indirect
                    Address: 0x925da38
                    Next-hop reference count: 4
                    Source: 10.9.9.5
                    Next hop type: Router, Next hop index: 1004
                    Next hop: 10.0.0.22 via fe-1/2/2.10, selected
                    Label operation: Push 299888
                    Label TTL action: prop-ttl
                    Protocol next hop: 10.100.1.5
                    Push 299888
                    Indirect next hop: 93514d8 262151
                    State: <Active Ext>
                    Local AS: 13979 Peer AS:  7018
                    Age: 22:03:26   Metric2: 2 
                    AIGP: 20 
                    Task: BGP_7018.10.9.9.5+58560
                    Announcement bits (3): 3-KRT 4-BGP_RT_Background 5-Resolve tree 1 
                    AS path: 7018 I
                    Accepted
                    Route Label: 299888
                    Localpref: 100
                    Router ID: 10.9.9.5
                    Indirect next hops: 1
                            Protocol next hop: 10.100.1.5 Metric: 2
                            Push 299888
                            Indirect next hop: 93514d8 262151
                            Indirect path forwarding next hops: 1
                                    Next hop type: Router
                                    Next hop: 10.0.0.22 via fe-1/2/2.10
                            10.100.1.5/32 Originating RIB: inet.0
                              Metric: 2                       Node path count: 1
                              Forwarding nexthops: 1
                                    Nexthop: 10.0.0.22 via fe-1/2/2.10
  5. デバイス PE4 で、 show route 66.0.0.0 extensive コマンドを実行します。

    プレフィックス66.0.0.0/24は、独自のAIGPメトリックと再帰BGPネクストホップの合計である解決AIGPを示しています。

    66.0.0.1 = 0, 55.0.0.1 = 20, 0+20 = 20

    content_copy zoom_out_map
    user@PE4> show route 66.0.0.0 extensive 
    inet.0: 31 destinations, 41 routes (31 active, 0 holddown, 0 hidden)
    66.0.0.0/24 (1 entry, 1 announced)
    TSI:
    KRT in-kernel 66.0.0.0/24 -> {indirect(262162)}
    Page 0 idx 0 Type 1 val 928cefc
        Flags: Nexthop Change
        Nexthop: 10.100.1.4
        Localpref: 100
        AS path: [13979] 7018 I
        Communities:
    Path 66.0.0.0 from 10.9.9.5 Vector len 4.  Val: 0
            *BGP    Preference: 170/-101
                    Next hop type: Indirect
                    Address: 0x925d4e0
                    Next-hop reference count: 4
                    Source: 10.9.9.5
                    Next hop type: Router, Next hop index: 1006
                    Next hop: 10.0.0.22 via fe-1/2/2.10, selected
                    Label operation: Push 299888, Push 299888(top)
                    Label TTL action: prop-ttl, prop-ttl(top)
                    Protocol next hop: 55.0.0.1
                    Push 299888
                    Indirect next hop: 9353e88 262162
                    State: <Active Ext>
                    Local AS: 13979 Peer AS:  7018
                    Age: 31:42      Metric2: 2 
                    Resolving-AIGP: 20 
                    Task: BGP_7018.10.9.9.5+58560
                    Announcement bits (3): 3-KRT 4-BGP_RT_Background 5-Resolve tree 1 
                    AS path: 7018 I
                    Accepted
                    Route Label: 299888
                    Localpref: 100
                    Router ID: 10.9.9.5
                    Indirect next hops: 1
                            Protocol next hop: 55.0.0.1 Metric: 2 AIGP: 20
                            Push 299888
                            Indirect next hop: 9353e88 262162
                            Indirect path forwarding next hops: 1
                                    Next hop type: Router
                                    Next hop: 10.0.0.22 via fe-1/2/2.10
                            55.0.0.0/24 Originating RIB: inet.0
                              Metric: 2                       Node path count: 1
                              Indirect nexthops: 1
                                    Protocol Nexthop: 10.100.1.5 Metric: 2 Push 299888
                                    Indirect nexthop: 93514d8 262151
                                    Indirect path forwarding nexthops: 1
                                            Nexthop: 10.0.0.22 via fe-1/2/2.10
                                    10.100.1.5/32 Originating RIB: inet.0
                                      Metric: 2                               Node path count: 1
                                      Forwarding nexthops: 1
                                            Nexthop: 10.0.0.22 via fe-1/2/2.10

BGPアップデートにおけるAIGP属性の存在の検証

目的

AIGP 属性が BGP(または group 階層または neighbor 階層)で使用可能になっていない場合、AIGP 属性は警告なしに破棄されます。traceoptionsを有効にし、設定のdetailオプションにpacketsフラグを含め、送信または受信するBGPアップデートにAIGP属性が存在することを確認します。これは、AIGP の問題をデバッグするときに役立ちます。

アクション
  1. traceoptions用にデバイス PE2 とデバイス PE4 を設定します。

    content_copy zoom_out_map
    user@host> show protocols bgp
        traceoptions {
            file bgp size 1m files 5;
            flag packets detail;
        }
    
  2. デバイス PE2 の traceoptions ファイルを確認します。

    以下の例では、AIGPメトリック20のデバイス PE2 アドバタイズプレフィックス 99.0.0.0/24 からデバイス PE4(10.9.9.4)に対して示しています。

    content_copy zoom_out_map
    user@PE2> show log bgp
    Mar 22 09:27:18.982150 BGP SEND 10.9.9.5+49652 -> 10.9.9.4+179
    Mar 22 09:27:18.982178 BGP SEND message type 2 (Update) length 70
    Mar 22 09:27:18.982198 BGP SEND Update PDU length 70
    Mar 22 09:27:18.982248 BGP SEND flags 0x40 code Origin(1): IGP
    Mar 22 09:27:18.982273 BGP SEND flags 0x40 code ASPath(2) length 6: 7018
    Mar 22 09:27:18.982295 BGP SEND flags 0x80 code AIGP(26): AIGP: 20 
    Mar 22 09:27:18.982316 BGP SEND flags 0x90 code MP_reach(14): AFI/SAFI 1/4
    Mar 22 09:27:18.982341 BGP SEND         nhop 10.100.1.5 len 4
    Mar 22 09:27:18.982372 BGP SEND         99.0.0.0/24 (label 301664)
    Mar 22 09:27:33.665412 bgp_send: sending 19 bytes to abcd::10:255:170:84 (External AS 13979)
    
  3. show route receive-protocolコマンドを使用して、デバイスPE4でルートを受信したことを確認します。

    AIGPはデバイスPE4で有効になっていないため、AIGP属性はプレフィックス99.0.0.0/24に対して暗黙的に破棄され、以下の出力には表示されません。

    content_copy zoom_out_map
    user@PE4> show route receive-protocol bgp 10.9.9.5 extensive | find 55.0.0.0
    * 99.0.0.0/24 (2 entries, 1 announced)
         Accepted
         Route Label: 301728
         Nexthop: 10.100.1.5
         AS path: 7018 I
    
  4. デバイス PE4 の traceoptions ファイルを確認します。

    traceoptions ログからの以下の出力は、AIGP 属性が付加された状態で 99.0.0.0/24 プレフィックスが受信されたことを示しています。

    content_copy zoom_out_map
    user@PE4> show log bgp
    Mar 22 09:41:39.650295 BGP RECV 10.9.9.5+64690 -> 10.9.9.4+179
    Mar 22 09:41:39.650331 BGP RECV message type 2 (Update) length 70
    Mar 22 09:41:39.650350 BGP RECV Update PDU length 70
    Mar 22 09:41:39.650370 BGP RECV flags 0x40 code Origin(1): IGP
    Mar 22 09:41:39.650394 BGP RECV flags 0x40 code ASPath(2) length 6: 7018
    Mar 22 09:41:39.650415 BGP RECV flags 0x80 code AIGP(26): AIGP: 20
    Mar 22 09:41:39.650436 BGP RECV flags 0x90 code MP_reach(14): AFI/SAFI 1/4
    Mar 22 09:41:39.650459 BGP RECV         nhop 10.100.1.5 len 4
    Mar 22 09:41:39.650495 BGP RECV         99.0.0.0/24 (label 301728)
    Mar 22 09:41:39.650574 bgp_rcv_nlri: 99.0.0.0/24
    Mar 22 09:41:39.650607 bgp_rcv_nlri: 99.0.0.0/24 belongs to meshgroup
    Mar 22 09:41:39.650629 bgp_rcv_nlri: 99.0.0.0/24 qualified bnp->ribact 0x0 l2afcb 0x0
    
意味

この検証を実行すると、AIGP のトラブルシューティングと問題のデバッグに役立ちます。ネットワーク内のどのデバイスがAIGP属性を送受信しているかを確認できます。

ASオーバーライドについて

ASオーバーライド機能により、プロバイダーエッジ(PE)ルーターは、VPNルーティングおよび転送(VRF)アクセスリンクで実行されている外部BGP(EBGP)セッション上のカスタマーエッジ(CE)デバイスが使用するプライベート自律システム(AS)番号を変更できます。プライベートAS番号がPE AS番号に変更されます。別の PE デバイスに接続された別の CE デバイスでは、プロバイダ ASN サイト 1-ASN ではなく、プロバイダ ASN プロバイダ ASN の AS パスを持つ最初のサイトからの EBGP ルートを確認します。これにより、エンタープライズネットワークはすべてのサイトで同じプライベートASNを使用できます。

デフォルトでは、BGPはローカルAS番号を含むASパス属性を持つBGPルートを受け入れないため、ASオーバーライド機能はサービスプロバイダに明確な管理上の利点を提供します。

複数のサイトを持つエンタープライズネットワークでは、サイト間で1つのAS番号を使用することもできます。たとえば、2つのCEデバイスがAS 64512にあり、プロバイダネットワークがAS 65534にあるとします。

サービスプロバイダがこの設定でレイヤー3 VPNを設定すると、MPLSネットワークにデバイスCE1およびデバイスCE2へのルートがある場合でも、ASパス属性が64512 65534 64512と表示されるため、デバイスCE1とデバイスCE2は互いのルートを持ちません。BGPは、ループ回避メカニズムとしてASパス属性を使用します。サイトがそれ自身のAS番号をASパス内で2回以上確認すると、そのルートは無効と見なされます。

この問題を克服する 1 つの方法は、PE デバイスに適用される as-override ステートメントを使用することです。as-overrideステートメントは、CEデバイスのAS番号をPEデバイスのAS番号に置き換え、カスタマーのAS番号がASパス属性に複数回表示されるのを防ぎます。

顧客がASパスを先頭に付加して特定のパスを望ましくなくし、サービスプロバイダがASオーバーライドを使用する場合、ASパスに出現する各CE AS番号はサービスプロバイダのAS番号に変更されます。たとえば、すべてのカスタマーサイトで64512という同一のAS番号を使用しているとします。ISPがAS番号65534を使用する場合、あるカスタマーサイトからは別のサイトへのパスを65534 65534として確認します。顧客が特定のパスの先頭に 64512 を追加して望ましくない場合、別の顧客サイトはそのパスを 65534 65534 65534 と表示します。

例:ルートリフレクションおよびASオーバーライドによるレイヤー3 VPNの設定

マネージドMPLSベースのレイヤー3 VPNサービスを提供するサービスプロバイダであるとします。顧客には複数のサイトがあり、各サイトのカスタマーエッジ(CE)デバイスへのBGPルーティングが必要です。

要件

この例を設定する前に、デバイス初期化以外の特別な設定を行う必要はありません。

概要

この例では、2 つの CE デバイス、2 つの PE(プロバイダ エッジ)デバイス、および複数のプロバイダ コア デバイスがあります。また、プロバイダネットワークは IS-IS を使用して LDP と BGP ループバック到達可能性をサポートしています。 デバイス P2 は、ルート リフレクタ(RR)として機能しています。両方のCEデバイスは自律システム(AS)64512にあります。プロバイダネットワークはAS 65534にあります。

as-overrideステートメントがPEデバイスに適用されるため、CEデバイスのAS番号がPEデバイスのAS番号に置き換えられます。これにより、カスタマーAS番号がASパス属性に複数回表示されるのを防ぎます。

図 5 この例で使用されているトポロジーを示しています。

図 5: ASオーバーライドトポロジーASオーバーライドトポロジー

CLIクイック構成は、図 5でのすべてのデバイスの設定を示しています。セクション ステップバイステップでの手順 では、デバイス PE1 の手順について説明します。

トポロジー

設定

手順

CLIクイック構成

この例をすばやく設定するには、次のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク構成に合わせて必要な詳細を変更し、[edit]階層レベルのCLIにコマンドをコピー&ペーストしてください。

デバイスCE1

content_copy zoom_out_map
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.1/30
set interfaces ge-1/2/0 unit 0 family iso
set interfaces lo0 unit 0 family inet address 10.255.1.1/32
set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0101.00
set protocols bgp group PE type external
set protocols bgp group PE family inet unicast
set protocols bgp group PE export ToBGP
set protocols bgp group PE peer-as 65534
set protocols bgp group PE neighbor 10.0.0.2
set policy-options policy-statement ToBGP term Direct from protocol direct
set policy-options policy-statement ToBGP term Direct then accept
set routing-options router-id 10.255.1.1
set routing-options autonomous-system 64512

デバイスP1

content_copy zoom_out_map
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.6/30
set interfaces ge-1/2/0 unit 0 family iso
set interfaces ge-1/2/0 unit 0 family mpls
set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.9/30
set interfaces ge-1/2/1 unit 0 family iso
set interfaces ge-1/2/1 unit 0 family mpls
set interfaces ge-1/2/2 unit 0 family inet address 10.0.0.25/30
set interfaces ge-1/2/2 unit 0 family iso
set interfaces ge-1/2/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.3.3/32
set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0303.00
set protocols mpls interface all
set protocols mpls interface fxp0.0 disable
set protocols bgp group l3vpn type internal
set protocols bgp group l3vpn local-address 10.255.3.3
set protocols bgp group l3vpn family inet-vpn unicast
set protocols bgp group l3vpn peer-as 65534
set protocols bgp group l3vpn local-as 65534
set protocols bgp group l3vpn neighbor 10.255.4.4
set protocols isis interface all level 2 metric 10
set protocols isis interface all level 1 disable
set protocols isis interface fxp0.0 disable
set protocols isis interface lo0.0 level 2 metric 0
set protocols ldp deaggregate
set protocols ldp interface all
set protocols ldp interface fxp0.0 disable
set routing-options router-id 10.255.3.3

デバイスP2

content_copy zoom_out_map
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.10/30
set interfaces ge-1/2/0 unit 0 family iso
set interfaces ge-1/2/0 unit 0 family mpls
set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.13/30
set interfaces ge-1/2/1 unit 0 family iso
set interfaces ge-1/2/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.4.4/32
set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0404.00
set protocols mpls interface all
set protocols mpls interface fxp0.0 disable
set protocols bgp group Core-RRClients type internal
set protocols bgp group Core-RRClients local-address 10.255.4.4
set protocols bgp group Core-RRClients family inet-vpn unicast
set protocols bgp group Core-RRClients cluster 10.255.4.4
set protocols bgp group Core-RRClients peer-as 65534
set protocols bgp group Core-RRClients neighbor 10.255.3.3
set protocols bgp group Core-RRClients neighbor 10.255.7.7
set protocols bgp group Core-RRClients neighbor 10.255.2.2
set protocols bgp group Core-RRClients neighbor 10.255.5.5
set protocols isis interface all level 2 metric 10
set protocols isis interface all level 1 disable
set protocols isis interface fxp0.0 disable
set protocols isis interface lo0.0 level 2 metric 0
set protocols ldp deaggregate
set protocols ldp interface all
set protocols ldp interface fxp0.0 disable
set routing-options router-id 10.255.4.4
set routing-options autonomous-system 65534

デバイスP3

content_copy zoom_out_map
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.22/30
set interfaces ge-1/2/0 unit 0 family iso
set interfaces ge-1/2/0 unit 0 family mpls
set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.26/30
set interfaces ge-1/2/1 unit 0 family iso
set interfaces ge-1/2/1 unit 0 family mpls
set interfaces ge-1/2/2 unit 0 family inet address 10.0.0.30/30
set interfaces ge-1/2/2 unit 0 family iso
set interfaces ge-1/2/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.7.7/32
set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0707.00
set protocols mpls interface all
set protocols mpls interface fxp0.0 disable
set protocols bgp group l3vpn type internal
set protocols bgp group l3vpn local-address 10.255.7.7
set protocols bgp group l3vpn family inet-vpn unicast
set protocols bgp group l3vpn peer-as 65534
set protocols bgp group l3vpn local-as 65534
set protocols bgp group l3vpn neighbor 10.255.4.4
set protocols isis interface all level 2 metric 10
set protocols isis interface all level 1 disable
set protocols isis interface fxp0.0 disable
set protocols isis interface lo0.0 level 2 metric 0
set protocols ldp deaggregate
set protocols ldp interface all
set protocols ldp interface fxp0.0 disable
set routing-options router-id 10.255.7.7

デバイスPE1

content_copy zoom_out_map
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.2/30
set interfaces ge-1/2/0 unit 0 family iso
set interfaces ge-1/2/0 unit 0 family mpls
set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.5/30
set interfaces ge-1/2/1 unit 0 family iso
set interfaces ge-1/2/1 unit 0 family mpls
set interfaces ge-1/2/2 unit 0 family inet address 10.0.0.21/30
set interfaces ge-1/2/2 unit 0 family iso
set interfaces ge-1/2/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.2.2/32
set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0202.00
set protocols mpls interface ge-1/2/2.0
set protocols mpls interface ge-1/2/1.0
set protocols mpls interface lo0.0
set protocols mpls interface fxp0.0 disable
set protocols bgp group l3vpn type internal
set protocols bgp group l3vpn local-address 10.255.2.2
set protocols bgp group l3vpn family inet-vpn unicast
set protocols bgp group l3vpn peer-as 65534
set protocols bgp group l3vpn local-as 65534
set protocols bgp group l3vpn neighbor 10.255.4.4
set protocols isis interface ge-1/2/1.0 level 2 metric 10
set protocols isis interface ge-1/2/1.0 level 1 disable
set protocols isis interface ge-1/2/2.0 level 2 metric 10
set protocols isis interface ge-1/2/2.0 level 1 disable
set protocols isis interface fxp0.0 disable
set protocols isis interface lo0.0 level 2 metric 0
set protocols ldp deaggregate
set protocols ldp interface ge-1/2/1.0
set protocols ldp interface ge-1/2/2.0
set protocols ldp interface fxp0.0 disable
set protocols ldp interface lo0.0
set routing-instances VPN-A instance-type vrf
set routing-instances VPN-A interface ge-1/2/0.0
set routing-instances VPN-A route-distinguisher 65534:1234
set routing-instances VPN-A vrf-target target:65534:1234
set routing-instances VPN-A protocols bgp group CE type external
set routing-instances VPN-A protocols bgp group CE family inet unicast
set routing-instances VPN-A protocols bgp group CE neighbor 10.0.0.1 peer-as 64512
set routing-instances VPN-A protocols bgp group CE neighbor 10.0.0.1 as-override
set routing-options router-id 10.255.2.2
set routing-options autonomous-system 65534

デバイスPE2

content_copy zoom_out_map
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.14/30
set interfaces ge-1/2/0 unit 0 family iso
set interfaces ge-1/2/0 unit 0 family mpls
set interfaces ge-1/2/1 unit 0 family inet address 10.0.0.17/30
set interfaces ge-1/2/1 unit 0 family iso
set interfaces ge-1/2/2 unit 0 family inet address 10.0.0.29/30
set interfaces ge-1/2/2 unit 0 family iso
set interfaces ge-1/2/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.5.5/32
set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0505.00
set protocols mpls interface ge-1/2/0.0
set protocols mpls interface ge-1/2/2.0
set protocols mpls interface lo0.0
set protocols mpls interface fxp0.0 disable
set protocols bgp group l3vpn type internal
set protocols bgp group l3vpn local-address 10.255.5.5
set protocols bgp group l3vpn family inet-vpn unicast
set protocols bgp group l3vpn peer-as 65534
set protocols bgp group l3vpn local-as 65534
set protocols bgp group l3vpn neighbor 10.255.4.4
set protocols isis interface ge-1/2/0.0 level 2 metric 10
set protocols isis interface ge-1/2/0.0 level 1 disable
set protocols isis interface ge-1/2/2.0 level 2 metric 10
set protocols isis interface ge-1/2/2.0 level 1 disable
set protocols isis interface fxp0.0 disable
set protocols isis interface lo0.0 level 2 metric 0
set protocols ldp deaggregate
set protocols ldp interface ge-1/2/0.0
set protocols ldp interface ge-1/2/2.0
set protocols ldp interface fxp0.0 disable
set protocols ldp interface lo0.0
set routing-instances VPN-A instance-type vrf
set routing-instances VPN-A interface ge-1/2/1.0
set routing-instances VPN-A route-distinguisher 65534:1234
set routing-instances VPN-A vrf-target target:65534:1234
set routing-instances VPN-A protocols bgp group CE type external
set routing-instances VPN-A protocols bgp group CE family inet unicast
set routing-instances VPN-A protocols bgp group CE neighbor 10.0.0.18 peer-as 64512
set routing-instances VPN-A protocols bgp group CE neighbor 10.0.0.18 as-override
set routing-options router-id 10.255.5.5
set routing-options autonomous-system 65534

デバイスCE2

content_copy zoom_out_map
set interfaces ge-1/2/0 unit 0 family inet address 10.0.0.18/30
set interfaces ge-1/2/0 unit 0 family iso
set interfaces lo0 unit 0 family inet address 10.255.6.6/32
set interfaces lo0 unit 0 family iso address 49.0001.0010.0000.0606.00
set protocols bgp group PE type external
set protocols bgp group PE family inet unicast
set protocols bgp group PE export ToBGP
set protocols bgp group PE peer-as 65534
set protocols bgp group PE neighbor 10.0.0.17
set policy-options policy-statement ToBGP term Direct from protocol direct
set policy-options policy-statement ToBGP term Direct then accept
set routing-options router-id 10.255.6.6
set routing-options autonomous-system 64512
ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLI のナビゲーションについては、CLIユーザー・ガイドコンフィギュレーション・モードでのCLIエディタの使用を参照してください。

ASオーバーライドを設定するには:

  1. インターフェイスを設定します。

    MPLSを有効にするには、インターフェイスが着信MPLSトラフィックを破棄しないように、インターフェイスにプロトコルファミリーを含めます。

    content_copy zoom_out_map
    [edit interfaces]
    user@PE1# set ge-1/2/0 unit 0 family inet address 10.0.0.2/30
    user@PE1# set ge-1/2/0 unit 0 family iso
    user@PE1# set ge-1/2/0 unit 0 family mpls
    user@PE1# set ge-1/2/1 unit 0 family inet address 10.0.0.5/30
    user@PE1# set ge-1/2/1 unit 0 family iso
    user@PE1# set ge-1/2/1 unit 0 family mpls
    user@PE1# set ge-1/2/2 unit 0 family inet address 10.0.0.21/30
    user@PE1# set ge-1/2/2 unit 0 family iso
    user@PE1# set ge-1/2/2 unit 0 family mpls
    user@PE1# set lo0 unit 0 family inet address 10.255.2.2/32
    user@PE1# set lo0 unit 0 family iso address 49.0001.0010.0000.0202.00
    
  2. インターフェイスをMPLSプロトコルに追加して、コントロールプレーンレベルの接続を確立します。

    プロバイダーデバイスが相互に通信できるようにIGPを設定します。

    MPLS ラベルを配布するメカニズムを確立するには、LDP を有効にします。オプションとして、LDP の場合、FEC(Forwarding Equivalence Class)のディスアグリゲーションを有効にすることで、グローバル コンバージェンスを高速化できます。

    content_copy zoom_out_map
    [edit protocols]
    user@PE1# set mpls interface ge-1/2/2.0
    user@PE1# set mpls interface ge-1/2/1.0
    user@PE1# set mpls interface lo0.0
    user@PE1# set mpls interface fxp0.0 disable
    user@PE1# set isis interface ge-1/2/1.0 level 2 metric 10
    user@PE1# set isis interface ge-1/2/1.0 level 1 disable
    user@PE1# set isis interface ge-1/2/2.0 level 2 metric 10
    user@PE1# set isis interface ge-1/2/2.0 level 1 disable
    user@PE1# set isis interface fxp0.0 disable
    user@PE1# set isis interface lo0.0 level 2 metric 0
    user@PE1# set ldp deaggregate
    user@PE1# set ldp interface ge-1/2/1.0
    user@PE1# set ldp interface ge-1/2/2.0
    user@PE1# set ldp interface fxp0.0 disable
    user@PE1# set ldp interface lo0.0
    
  3. IPv4 VPN ユニキャスト アドレス ファミリーを使用して、RR とのみピアリングするための内部 BGP(IBGP)接続を有効にします。

    content_copy zoom_out_map
    [edit protocols bgp group l3vpn]
    user@PE1# set type internal
    user@PE1# set local-address 10.255.2.2
    user@PE1# set family inet-vpn unicast
    user@PE1# set peer-as 65534
    user@PE1# set local-as 65534
    user@PE1# set neighbor 10.255.4.4
    
  4. as-override ステートメントを含むルーティングインスタンスを設定します。

    PEデバイスでルーティングインスタンス(VRF)を作成し、デバイスCE1とピアリングするようにBGP設定を設定します。

    content_copy zoom_out_map
    [edit routing-instances VPN-A]
    user@PE1# set instance-type vrf
    user@PE1# set interface ge-1/2/0.0
    user@PE1# set route-distinguisher 65534:1234
    user@PE1# set vrf-target target:65534:1234
    user@PE1# set protocols bgp group CE type external
    user@PE1# set protocols bgp group CE family inet unicast
    user@PE1# set protocols bgp group CE neighbor 10.0.0.1 peer-as 64512
    user@PE1# set protocols bgp group CE neighbor 10.0.0.1 as-override
    
  5. ルーターID、AS番号を設定する。

    content_copy zoom_out_map
    [edit routing-options]
    user@PE1# set router-id 10.255.2.2
    user@PE1# set autonomous-system 65534
    
結果

設定モードから、show interfacesshow protocolsshow routing-instances、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の設定手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@PE1# show interfaces
ge-1/2/0 {
    unit 2 {
        family inet {
            address 10.0.0.2/30;
        }
        family iso;
        family mpls;
    }
}
ge-1/2/1 {
    unit 5 {
        family inet {
            address 10.0.0.5/30;
        }
        family iso;
        family mpls;
    }
}
ge-1/2/2 {
    unit 21 {
        family inet {
            address 10.0.0.21/30;
        }
        family iso;
        family mpls;
    }
}
lo0 {
    unit 0 {
        family inet {
            address 10.255.2.2/32;
        }
        family iso {
            address 49.0001.0010.0000.0202.00;
        }
    }
}
content_copy zoom_out_map
user@PE1# show protocols
mpls {
    interface ge-1/2/2.0;
    interface ge-1/2/1.0;
    interface lo0.0;
    interface fxp0.0 {
        disable;
    }
}
bgp {
    group l3vpn {
        type internal;
        local-address 10.255.2.2;
        family inet-vpn {
            unicast;
        }
        peer-as 65534;
        local-as 65534;
        neighbor 10.255.4.4;
    }
}
isis {
    interface ge-1/2/1.0 {
        level 2 metric 10;
        level 1 disable;
    }
    interface ge-1/2/2.0 {
        level 2 metric 10;
        level 1 disable;
    }
    interface fxp0.0 {
        disable;
    }
    interface lo0.0 {
        level 2 metric 0;
    }
}
ldp {
    deaggregate;
    interface ge-1/2/1.0;
    interface ge-1/2/2.0;
    interface fxp0.0 {
        disable;
    }
    interface lo0.0;
}
content_copy zoom_out_map
user@PE1# show routing-instances
VPN-A {
    instance-type vrf;
    interface ge-1/2/0.0;
    route-distinguisher 65534:1234;
    vrf-target target:65534:1234;
    protocols {
        bgp {
            group CE {
                type external;
                family inet {
                    unicast;
                }
                neighbor 10.0.0.1 {
                    peer-as 64512;
                    as-override;
                }
            }
        }
    }
}
content_copy zoom_out_map
user@PE1# show routing-options
router-id 10.255.2.2;
autonomous-system 65534;

デバイスの設定が完了したら、設定モードから commit を入力します。

検証

設定が正常に機能していることを確認します。

CEデバイスへのASパスの確認

目的

デバイスCE2のループバックインターフェイスへのルートのASパス属性に関する情報をデバイスPE1に表示します。

アクション

デバイスPE1で、運用モードから show route table VPN-A.inet.0 10.255.6.6 コマンドを入力します。

content_copy zoom_out_map
user@PE1> show route table VPN-A.inet.0 10.255.6.6
 

VPN-A.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.255.6.6/32      *[BGP/170] 02:19:35, localpref 100, from 10.255.4.4
                      AS path: 64512 I, validation-state: unverified
                    > to 10.0.0.22 via ge-1/2/2.0, Push 300032, Push 299776(top)
意味

出力は、デバイスPE1にAS 64512からの10.255.6.6/32へのASパスがあることを示しています。

デバイスCE2へのルートがどのようにアドバタイズされているかを確認する

目的

デバイスCE2へのルートが、MPLSコアから来ているかのようにデバイスCE1にアドバタイズされていることを確認します。

アクション

デバイスPE1で、運用モードから show route advertising-protocol bgp 10.0.0.1 コマンドを入力します。

content_copy zoom_out_map
user@PE1> show route advertising-protocol bgp 10.0.0.1
 
VPN-A.inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
* 10.0.0.16/30            Self                                    I
* 10.255.1.1/32           10.0.0.1                                65534 I
* 10.255.6.6/32           Self                                    65534 I
意味

この出力は、デバイスPE1がASパスでそれ自身のAS番号のみをアドバタイズしていることを示しています。

デバイスCE1でのルートの確認

目的

デバイスCE1に、デバイスCE2へのルートのASパスにプロバイダAS番号のみが含まれていることを確認します。

アクション

動作モードからshow route table inet.0 terse 10.255.6.6コマンドを入力します。

content_copy zoom_out_map
user@CE1> show route table inet.0 terse 10.255.6.6

inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both

A V Destination        P Prf   Metric 1   Metric 2  Next hop        AS path
* ? 10.255.6.6/32      B 170        100                             65534 65534 I
  unverified                                       >10.0.0.2
意味

この出力は、デバイスCE1にデバイスCE2へのルートがあることを示しています。ループの問題は、 as-override ステートメントを使用すると解決されます。

CEデバイスでは1つのルートが非表示になっています。これは、Junos OSがBGPスプリットホライズンを実行しないためです。一般的に、BGPでのスプリットホライズンは不要です。これは、ASパス長(EBGPの場合)、ASパスループ検知(IBGP)、またはその他のBGPメトリックにより、発信元が受信するルートの優先度が低いためです。学習元のネイバーに戻るアドバタイズルートは、ルーターのパフォーマンスに与える影響はごくわずかであり、正しいことです。

例:BGP ルート広告の有効化

Junos OSは、あるEBGPピアから学習した経路を同じ外部BGP(EBGP)ピアに戻してアドバタイズすることはありません。さらに、ソフトウェアは、ルーティングインスタンスに関係なく、送信元ピアと同じ自律システム(AS)内にあるEBGPピアにルートをアドバタイズしません。コンフィギュレーションにこのステートadvertise-peer-asメントを含めることで、この動作を変更することができます。

コンフィグレーションにこのadvertise-peer-asというステートメントを含めると,BGPはこのチェックに関係なくルートをアドバタイズします。

デフォルトの動作に戻すには、コンフィギュレーションにこのno-advertise-peer-asというステートメントを含めます:

content_copy zoom_out_map

コンフィグレーションにこのas-overrideというステートメントが含まれる場合、ルート抑止のデフォルト動作は無効になります。as-overrideおよびという両方のステートno-advertise-peer-asメントをコンフィギュレーションに含めると、このというステートno-advertise-peer-asメントは無視されます。

要件

この例を構成する前に、デバイスの初期化以上の特別な構成は必要ありません。

注:

この例は、Junosリリース21.2R1で更新され、再検証されました。

概要

この例では、外部BGP(EBGP)接続を持つ3つのルーティングデバイスを示しています。デバイスR2には、デバイスR1へのEBGP接続と、デバイスR3への別のEBGP接続があります。AS 64511にあるデバイスR2で分離されていますが、デバイスR1とデバイスR3は同じAS(AS 64512)にあります。デバイスR1とデバイスR3は、独自のループバックインターフェイスアドレスへのBGPダイレクトルートにアドバタイズします。

デバイスR2はこれらのループバックインターフェイスルートを受信し、 advertise peer-as ステートメントによりデバイスR2はそれらをアドバタイズできます。具体的には、デバイスR1は192.168.0.1ルートをデバイスR2に送信し、デバイスR2には advertise peer-as が設定されているため、デバイスR2はデバイスR3に192.168.0.1ルートを送信できます。同様に、デバイスR3は192.168.0.3ルートをデバイスR2に送信し、 advertise peer-as デバイスR2がデバイスR1にルートを転送できるようにします。

デバイスR1とデバイスR3が、ASパスにそれ自身のAS番号を含むルートを受け入れるようにするには、デバイスR1とデバイスR3に loops 2 ステートメントが必要です。

トポロジー

図 6: アドバタイズピアASのBGPトポロジーアドバタイズピアASのBGPトポロジー

設定

CLIクイック構成

この例をすばやく設定するには、次のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク構成に合わせて必要な詳細を変更し、[edit]階層レベルのCLIにコマンドをコピー&ペーストしてください。

デバイスR1

content_copy zoom_out_map
set interfaces xe-0/2/0 description R1-to-R2
set interfaces xe-0/2/0 unit 0 family inet address 10.0.0.1/30
set interfaces lo0 unit 0 family inet address 192.168.0.1/32
set protocols bgp family inet unicast loops 2
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext peer-as 64511
set protocols bgp group ext neighbor 10.0.0.2
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64512

デバイスR2

content_copy zoom_out_map
set interfaces xe-0/2/0 description R2-to-R1
set interfaces xe-0/2/0 unit 0 family inet address 10.0.0.2/30
set interfaces xe-0/2/1 description R2-to-R3
set interfaces xe-0/2/1 unit 0 family inet address 10.1.0.1/30
set interfaces lo0 unit 0 family inet address 192.168.0.2/32
set protocols bgp group ext type external
set protocols bgp group ext advertise-peer-as
set protocols bgp group ext export send-direct
set protocols bgp group ext neighbor 10.0.0.1 peer-as 64512
set protocols bgp group ext neighbor 10.1.0.2 peer-as 64512
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64511

デバイスR3

content_copy zoom_out_map
set interfaces xe-0/2/0 description R3-to-R2
set interfaces xe-0/2/0 unit 0 family inet address 10.1.0.2/30
set interfaces lo0 unit 0 family inet address 192.168.0.3/32
set protocols bgp family inet unicast loops 2
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext peer-as 64511
set protocols bgp group ext neighbor 10.1.0.1
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set routing-options autonomous-system 64512

手順

ステップバイステップでの手順

次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

Device R1を設定するには:

  1. デバイスインターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@R1# set xe-0/2/0 description R1-to-R2
    user@R1# set xe-0/2/0 unit 0 family inet address 10.0.0.1/30
    user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
    
  2. BGP を設定します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R1# set type external
    user@R1# set peer-as 64511
    user@R1# set neighbor 10.0.0.2
    
  3. loops 2 ステートメントを含めることで、デバイス R3 からのルートがデバイス R1 で非表示にならないようにします。

    loops 2ステートメントは、ルートを非表示にすることなく、ローカルデバイス自身のAS番号をASパスに1回まで表示できることを意味します。ローカルデバイスのAS番号がパスで2回以上検知された場合、ルートは非表示になります。

    content_copy zoom_out_map
    [edit protocols bgp family inet unicast]
    user@R1# set loops 2
    
  4. 直接ルートを送信するルーティングポリシーを設定します。

    content_copy zoom_out_map
    [edit policy-options policy-statement send-direct term 1]
    user@R1# set from protocol direct
    user@R1# set then accept
    
  5. デバイスR2とのBGPピアリングセッションにエクスポートポリシーを適用します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R1# set export send-direct
    
  6. 自律システム(AS)番号を設定します。

    content_copy zoom_out_map
    [edit routing-options ]
    user@R1# set autonomous-system 64512
    
ステップバイステップでの手順

デバイスR2 を設定するには:

  1. デバイスインターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@R2# set xe-0/2/0 description R2-to-R1
    user@R2# set xe-0/2/0 unit 0 family inet address 10.0.0.2/30
    user@R2# set xe-0/2/1 description R2-to-R3
    user@R2# set xe-0/2/1 unit 0 family inet address 10.1.0.1/30
    user@R2# set lo0 unit 0 family inet address 192.168.0.2/32
    
  2. BGP を設定します。

    content_copy zoom_out_map
    [edit  protocols bgp group ext]
    user@R2# set type external
    user@R2# set neighbor 10.0.0.1 peer-as 64512
    user@R2# set neighbor 10.1.0.2 peer-as 64512
    
  3. 同じAS内で、あるEBGPピアから別のEBGPピアに学習されたルートをアドバタイズするように、デバイスR2を設定します。

    言い換えると、デバイスR1およびデバイスR3が同じAS内にあっても、デバイスR3から(およびその逆から)学習したデバイスR1のルートにアドバタイズします。

    content_copy zoom_out_map
    [edit  protocols bgp group ext]
    user@R2# set advertise-peer-as
    
  4. 直接ルートを送信するルーティングポリシーを設定します。

    content_copy zoom_out_map
    [edit policy-options policy-statement send-direct term 1]
    user@R2# set from protocol direct
    user@R2# set then accept
    
  5. エクスポートポリシーを適用します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R2# set export send-direct
    
  6. AS番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R2# set autonomous-system 64511
    
結果

設定モードから、show interfacesshow protocolsshow policy-options、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

デバイスR1

content_copy zoom_out_map
user@R1# show interfaces
xe-0/2/0 {
    description R1-to-R2;
    unit 0 {
        family inet {
            address 10.0.0.1/30;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 192.168.0.1/32;
        }
    }
}
content_copy zoom_out_map
user@R1# show protocols
bgp {
    family inet {
        unicast {
            loops 2;
        }
    }
    group ext {
        type external;
        export send-direct;
        peer-as 64511;
        neighbor 10.0.0.2;
    }
}
content_copy zoom_out_map
user@R1# show policy-options
policy-statement send-direct {
    term 1 {
        from protocol direct;
        then accept;
    }
}
content_copy zoom_out_map
user@R1# show routing-options
autonomous-system 64512;

デバイスR2

content_copy zoom_out_map
user@R2# show interfaces
xe-0/2/0 {
    description R2-to-R1;
    unit 0 {
        family inet {
            address 10.0.0.2/30;
        }
    }
}
xe-0/2/1 {
    description R2-to-R3;
    unit 0 {
        family inet {
            address 10.1.0.1/30;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 192.168.0.2/32;
        }
    }
}
content_copy zoom_out_map
user@R2# show protocols
bgp {
    group ext {
        type external;
        advertise-peer-as;
        export send-direct;
        neighbor 10.0.0.1 {
            peer-as 64512;
        }
        neighbor 10.1.0.2 {
            peer-as 64512;
        }
    }
}
content_copy zoom_out_map
user@R2# show policy-options
policy-statement send-direct {
    term 1 {
        from protocol direct;
        then accept;
    }
}
content_copy zoom_out_map
user@R2# show routing-options
autonomous-system 64511;

デバイスの設定が完了したら、設定モードからcommitを入力します。

検証

設定が正常に機能していることを確認します。

BGP ルートの検証

目的

デバイスR1とデバイスR3のルーティングテーブルに、予期されるルートが含まれていることを確認します。

アクション
  1. デバイスR2で、BGP設定の advertise-peer-as ステートメントを無効にします。

    content_copy zoom_out_map
    [edit  protocols bgp group ext]
    user@R2# deactivate advertise-peer-as
    user@R2# commit
    
  2. デバイスR3で、BGP設定の loops ステートメントを無効にします。

    content_copy zoom_out_map
    [edit  protocols bgp family inet unicast ]
    user@R3# deactivate unicast loops 
    user@R3# commit
    
  3. デバイスR1で、デバイスR2に対してどのルートがアドバタイズされているかを確認します。

    content_copy zoom_out_map
    user@R1> show route advertising-protocol bgp 10.0.0.2
    inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             Self                                    I
    * 192.168.0.1/32          Self                                    I
    
  4. デバイスR2で、デバイスR1から受信したルートを確認します。

    content_copy zoom_out_map
    user@R2> show route receive-protocol bgp 10.0.0.1
    inet.0: 7 destinations, 9 routes (7 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
      10.0.0.0/30             10.0.0.1                                64512 I
    * 192.168.0.1/32          10.0.0.1                                64512 I
  5. デバイスR2で、デバイスR3に対してどのルートがアドバタイズされているかを確認します。

    content_copy zoom_out_map
    user@R2> show route advertising-protocol bgp 10.1.0.2
    inet.0: 7 destinations, 9 routes (7 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             Self                                    I
    * 10.1.0.0/30             Self                                    I
    * 192.168.0.2/32          Self                                    I
    
  6. デバイスR2で、BGP設定の advertise-peer-as ステートメントを有効にします。

    content_copy zoom_out_map
    [edit  protocols bgp group ext]
    user@R2# activate advertise-peer-as
    user@R2# commit
    
  7. デバイスR2で、デバイスR3にアドバタイズされているルートを再確認します。

    content_copy zoom_out_map
    user@R2> show route advertising-protocol bgp 10.1.0.2
    inet.0: 7 destinations, 9 routes (7 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             Self                                    I
    * 10.1.0.0/30             Self                                    I
    * 192.168.0.1/32          Self             64512 I
    * 192.168.0.2/32          Self                                    I
    * 192.168.0.3/32          10.1.0.2         64512 I
  8. デバイスR3で、デバイスR2から受信したルートを確認します。

    content_copy zoom_out_map
    user@R3> show route receive-protocol bgp 10.1.0.1
    inet.0: 5 destinations, 6 routes (5 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             10.1.0.1                                64511 I
      10.1.0.0/30             10.1.0.1                                64511 I
    * 192.168.0.2/32          10.1.0.1                                64511 I
  9. デバイスR3で、BGP設定の loops ステートメントを有効にします。

    content_copy zoom_out_map
    [edit  protocols bgp family inet unicast ]
    user@R3# activate unicast loops 
    user@R3# commit
    
  10. デバイスR3で、デバイスR2から受信したルートを再確認します。

    content_copy zoom_out_map
    user@R3> show route receive-protocol bgp 10.1.0.1
    inet.0: 6 destinations, 8 routes (6 active, 0 holddown, 1 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 10.0.0.0/30             10.1.0.1                                64511 I
      10.1.0.0/30             10.1.0.1                                64511 I
    * 192.168.0.1/32          10.1.0.1                                64511 64512 I
    * 192.168.0.2/32          10.1.0.1                                64511 I
    
意味

まず、 advertise-peer-as ステートメントと loops ステートメントが非アクティブ化され、デフォルトの動作を調べることができます。デバイスR1は、デバイスR1のループバックインターフェイスアドレス192.168.0.1/32へのルートをデバイスR2に送信します。デバイスR2は、デバイスR3にこのルートをアドバタイズしません。advertise-peer-asステートメントを有効にした後、デバイスR2はデバイスR3に192.168.0.1/32ルートをアドバタイズします。デバイスR3は、 loops ステートメントがアクティブになるまで、このルートを受け入れません。

BGPループ検知の独立ASドメインで属性セットメッセージを無効化する

特定ルートのBGPループ検知では、ルーティングインスタンスにローカル自律システム(AS)ドメインを使用します。デフォルトでは、すべてのルーティングインスタンスは単一のプライマリルーティングインスタンスドメインに属します。そのため、BGPループ検知では、すべてのルーティングインスタンスに設定されたローカルASを使用します。ネットワーク構成によっては、このデフォルトの動作によってルートがループして非表示になる場合があります。

プライマリルーティングインスタンスのローカルASを制限するには、ルーティングインスタンスの独立ASドメインを設定します。独立ドメインは、プライマリルーティングインスタンスから分離されており、独立ドメインのASパスが他のドメインのASパスおよびASパス属性と共有されないようにします。

デフォルトでは、独立ドメインは推移的なパス属性 128(属性セット)メッセージを使用して、内部 BGP(IBGP)コアを介して独立ドメインの BGP 属性をトンネリングします。ただし、独立ドメインに対する属性セット メッセージの動作は、多くの場合望ましくありません。ルーティングインスタンス内のローカルASの独立性を維持するためにのみ独立ドメインを設定し、ルーティングインスタンス内の指定されたローカルASに対してのみBGPループ検出を実行する場合は、属性セットメッセージを無効にできます。

独立したドメインで属性セット メッセージを無効化するには、 independent-domain no-attrset ステートメントを含めます。

  1. 変更する独立ドメインを含むルーティングインスタンスを選択します。ルーティングインスタンスは、以下の階層レベルから選択できます。
    • [edit routing-instances routing-instance-name]

    • [edit logical-systems logical-system-name routing-instances routing-instance-name]

  2. 独立ドメインの属性セット メッセージを無効にします。
    content_copy zoom_out_map
    [edit routing-instances instance-name]
    user@host# set routing-options autonomous-system as-number independent-domain no-attrset
    
    ヒント:

    属性セットメッセージを無効にする場合は、プライマリルーティングインスタンスのAS番号を指定することをお勧めします。これにより、プライマリルーティングインスタンスASはルーティングインスタンス内でローカルASとして扱われ、BGPループ検知に使用されるようになります。

独立ドメインのルーティングインスタンスを指定すると、ローカルASはそのルーティングインスタンスにのみ関連付けられます。つまり、BGPループ検知は、ルーティングインスタンスで定義されたローカルASのみを使用します。

例:最適経路の選択時にASパス属性を無視する

同じ宛先への BGP ルートが複数存在する場合、BGP はパスのルート属性に基づいて最適なパスを選択します。最適経路の決定に影響を与えるルート属性の1つとして、各ルートのASパスの長さがあります。短いASパスを持つルートが、長いASパスを持つルートよりも好まれます。通常は現実的ではありませんが、ルート選択プロセスでASパス長を無視することが求められる場合があります。この例では、ASパス属性を無視するようにルーティングデバイスを設定する方法を示しています。

要件

この例を構成する前に、デバイスの初期化以上の特別な構成は必要ありません。

概要

外部に接続されたルーティング デバイスでは、ASパスの比較をスキップすることが目的として、外部BGP(EBGP)と内部BGP(IBGP)のどちらに対しても、できるだけ早くネットワークからトラフィックを削除するように強制することが目的になる場合があります。内部接続されたルーティング デバイスでは、IBGP 専用ルーターをローカルの外部接続ゲートウェイにデフォルト設定することができます。ローカルのIBGPのみ(内部)ルーターは、ASパスの比較をスキップし、ディシジョンツリーを下に移動して、最も近い内部ゲートウェイプロトコル(IGP)ゲートウェイ(最低のIGPメトリック)を使用します。これを行うことは、これらのルーターがWAN接続ではなくLAN接続を使用するように強制する効果的な方法かもしれません。

注意:

ネットワーク内のルーティング・デバイスに as-path-ignore ステートメントを含める場合、ルーティング・ループやコンバージェンスの問題を防ぐために、ネットワーク内の他のすべての BGP 対応デバイスに含める必要がある場合があります。これは、特に IBGP パス比較に当てはまります。

この例では、デバイスR2は、デバイスR4(10.4.4.4/32)のループバック インターフェイス アドレスをデバイス R1 とデバイス R3 から学習しています。デバイスR1はASパス65001 65005 65004で10.4.4.4/32をアドバタイズし、デバイスR3はASパス65003 65004で10.4.4.4/32をアドバタイズしています。ASパスがデバイスR1からのASパスよりも短いため、デバイスR2はデバイスR3からの10.4.4.4/32のパスを最適パスとして選択します。

この例では、デバイスR2のBGP設定を変更して、最適経路の選択にASパス長が使用されないようにしています。

デバイスR1のルーターID(10.1.1.1)は、デバイスR3(10.3.3.3)よりも低くなっています。他のすべてのパス選択基準が等しい(または、この場合のように無視される)場合、デバイスR1から学習したルートが使用されます。ASパス属性が無視されているため、下位ルーターID値により、デバイスR1へのパスが最適です。

図 7サンプルのトポロジーを示しています。

図 7: ASパス長を無視するためのトポロジーASパス長を無視するためのトポロジー

設定

CLIクイック構成

この例をすばやく設定するには、次のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク構成に合わせて必要な詳細を変更し、[edit]階層レベルのCLIにコマンドをコピー&ペーストしてください。

デバイスR1

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 1 family inet address 192.168.10.1/24
set interfaces fe-1/2/1 unit 10 family inet address 192.168.50.2/24
set interfaces lo0 unit 1 family inet address 10.1.1.1/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext export send-local
set protocols bgp group ext neighbor 192.168.10.2 peer-as 65002
set protocols bgp group ext neighbor 192.168.50.1 peer-as 65005
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-local term 1 from protocol local
set policy-options policy-statement send-local term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 192.168.20.0/24 next-hop 192.168.10.2
set routing-options static route 192.168.30.0/24 next-hop 192.168.10.2
set routing-options static route 192.168.40.0/24 next-hop 192.168.50.1
set routing-options router-id 10.1.1.1
set routing-options autonomous-system 65001

デバイスR2

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 2 family inet address 192.168.10.2/24
set interfaces fe-1/2/1 unit 3 family inet address 192.168.20.2/24
set interfaces lo0 unit 2 family inet address 10.2.2.2/32
set protocols bgp path-selection as-path-ignore
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext export send-local
set protocols bgp group ext neighbor 192.168.10.1 peer-as 65001
set protocols bgp group ext neighbor 192.168.20.1 peer-as 65003
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-local term 1 from protocol local
set policy-options policy-statement send-local term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 192.168.50.0/24 next-hop 192.168.10.1
set routing-options static route 192.168.40.0/24 next-hop 192.168.10.1
set routing-options static route 192.168.30.0/24 next-hop 192.168.20.1
set routing-options router-id 10.2.2.2
set routing-options autonomous-system 65002

デバイスR3

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 4 family inet address 192.168.20.1/24
set interfaces fe-1/2/1 unit 5 family inet address 192.168.30.1/24
set interfaces lo0 unit 3 family inet address 10.3.3.3/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext export send-local
set protocols bgp group ext neighbor 192.168.20.2 peer-as 65002
set protocols bgp group ext neighbor 192.168.30.2 peer-as 65004
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-local term 1 from protocol local
set policy-options policy-statement send-local term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 192.168.10.0/24 next-hop 192.168.20.2
set routing-options static route 192.168.50.0/24 next-hop 192.168.20.2
set routing-options static route 192.168.40.0/24 next-hop 192.168.30.2
set routing-options router-id 10.3.3.3
set routing-options autonomous-system 65003

デバイス R4

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 6 family inet address 192.168.30.2/24
set interfaces fe-1/2/1 unit 7 family inet address 192.168.40.1/24
set interfaces lo0 unit 4 family inet address 10.4.4.4/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext export send-local
set protocols bgp group ext neighbor 192.168.30.1 peer-as 65003
set protocols bgp group ext neighbor 192.168.40.2 peer-as 65005
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-local term 1 from protocol local
set policy-options policy-statement send-local term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 192.168.10.0/24 next-hop 192.168.40.2
set routing-options static route 192.168.50.0/24 next-hop 192.168.40.2
set routing-options static route 192.168.40.0/24 next-hop 192.168.30.1
set routing-options router-id 10.4.4.4
set routing-options autonomous-system 65004

デバイス R5

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 8 family inet address 192.168.40.2/24
set interfaces fe-1/2/1 unit 9 family inet address 192.168.50.1/24
set interfaces lo0 unit 5 family inet address 10.5.5.5/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext export send-local
set protocols bgp group ext neighbor 192.168.40.1 peer-as 65004
set protocols bgp group ext neighbor 192.168.50.2 peer-as 65001
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-local term 1 from protocol local
set policy-options policy-statement send-local term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 192.168.10.0/24 next-hop 192.168.50.2
set routing-options static route 192.168.20.0/24 next-hop 192.168.50.2
set routing-options static route 192.168.30.0/24 next-hop 192.168.40.1
set routing-options router-id 10.5.5.5
set routing-options autonomous-system 65005

デバイスR2の設定

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

デバイスR2 を設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@R2# set fe-1/2/0 unit 2 family inet address 192.168.10.2/24
    user@R2# set fe-1/2/1 unit 3 family inet address 192.168.20.2/24
    user@R2# set lo0 unit 2 family inet address 10.2.2.2/32
    
  2. EBGPを設定します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R2# set type external
    user@R2# set export send-direct
    user@R2# set export send-static
    user@R2# set export send-local
    user@R2# set neighbor 192.168.10.1 peer-as 65001
    user@R2# set neighbor 192.168.20.1 peer-as 65003
    
  3. Junos OSのパス選択アルゴリズムで自律システム(AS)パス属性が無視されるように設定します。

    content_copy zoom_out_map
    [edit protocols bgp]
    user@R2# set path-selection as-path-ignore
    
  4. ルーティングポリシーを設定します。

    content_copy zoom_out_map
    [edit policy-options]
    user@R2# set policy-statement send-direct term 1 from protocol direct
    user@R2# set policy-statement send-direct term 1 then accept
    user@R2# set policy-statement send-local term 1 from protocol local
    user@R2# set policy-statement send-local term 1 then accept
    user@R2# set policy-statement send-static term 1 from protocol static
    user@R2# set policy-statement send-static term 1 then accept
    
  5. いくつかのスタティックルートを設定します。

    content_copy zoom_out_map
    [edit routing-options static]
    user@R2# set route 192.168.50.0/24 next-hop 192.168.10.1
    user@R2# set route 192.168.40.0/24 next-hop 192.168.10.1
    user@R2# set route 192.168.30.0/24 next-hop 192.168.20.1
    
  6. 自律システム(AS)番号とルーターIDを設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R2# set router-id 10.2.2.2
    user@R2# set autonomous-system 65002
    
結果

設定モードから、show interfacesshow policy-optionsshow protocols、およびshow routing-options のコマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@R2# show interfaces
fe-1/2/0 {
    unit 2 {
        family inet {
            address 192.168.10.2/24;
        }
    }
}
fe-1/2/1 {
    unit 3 {
        family inet {
            address 192.168.20.2/24;
        }
    }
}
lo0 {
    unit 2 {
        family inet {
            address 10.2.2.2/32;
        }
    }
}
content_copy zoom_out_map
user@R2# show policy-options
policy-statement send-direct {
    term 1 {
        from protocol direct;
        then accept;
    }
}
policy-statement send-local {
    term 1 {
        from protocol local;
        then accept;
    }
}
policy-statement send-static {
    term 1 {
        from protocol static;
        then accept;
    }
}
content_copy zoom_out_map
user@R2# show protocols
bgp {
    path-selection as-path-ignore;
    group ext {
        type external;
        export [ send-direct send-static send-local ];
        neighbor 192.168.10.1 {
            peer-as 65001;
        }
        neighbor 192.168.20.1 {
            peer-as 65003;
        }
    }
}
content_copy zoom_out_map
user@R2# show routing-options
static {
    route 192.168.50.0/24 next-hop 192.168.10.1;
    route 192.168.40.0/24 next-hop 192.168.10.1;
    route 192.168.30.0/24 next-hop 192.168.20.1;
}
router-id 10.2.2.2;
autonomous-system 65002;

デバイスの設定が完了したら、設定モードから commit を入力します。ネットワーク内の他のデバイスで設定を繰り返し、必要に応じてインターフェイス名とIPアドレスを変更します。

検証

設定が正常に機能していることを確認します。

ネイバーステータスの確認

目的

デバイスR2から、AS 4に到達するまでのアクティブパスが、AS 65003を介さず、AS 65001とAS 65005を通ることを確認します。

注:

as-path-ignore ステートメントの機能を検証するには、restart routing コマンドを実行してアクティブ・パスの再評価を強制する必要がある場合があります。これは、BGPでは、両方のパスが外部にある場合、Junos OSの動作により現在アクティブなパスが優先されるためです。この動作は、ルート フラップの最小化に役立ちます。実稼働ネットワークでルーティングプロトコルプロセスを再起動する場合は注意が必要です。

アクション

動作モードからrestart routingコマンドを入力します。

content_copy zoom_out_map
user@R2> restart routing
Routing protocols process started, pid 49396

動作モードからshow route 10.4.4.4 protocol bgpコマンドを入力します。

content_copy zoom_out_map
user@R2> show route 10.4.4.4 protocol bgp
inet.0: 12 destinations, 25 routes (12 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both

10.4.4.4/32         *[BGP/170] 00:00:12, localpref 100
                      AS path: 65001 65005 65004 I
                    > to 192.168.10.1 via fe-1/2/0.2
                    [BGP/170] 00:00:08, localpref 100
                      AS path: 65003 65004 I
                    > to 192.168.20.1 via fe-1/2/1.3
意味

アスタリスク(*)はR1から学習したパスの隣にあり、これがアクティブなパスであることを意味します。アクティブパスのASパスは65001 65005 65004で、ルーターR3から学習した非アクティブパスのASパス(65003 65004)よりも長くなっています。

ASパスからのプライベートAS番号削除を理解する

デフォルトでは、BGPがリモートシステムへのASパスをアドバタイズする場合に、プライベートAS番号を含むすべてのAS番号が通知されます。ASパスからプライベートAS番号を削除するようにソフトウェアを設定できます。これは、次のいずれかの状況に該当する場合に便利です。

  • 接続を提供しているリモートASはマルチホームですが、これはローカルASに対してのみです。

  • リモートASには、正式に割り当てられたAS番号はありません。

  • リモートASをローカルASのコンフェデレーションメンバーASにすることは適切ではありません。

ほとんどの企業は、独自のAS番号を取得しています。企業によっては、自社のパブリックASネットワークに接続するために、プライベートAS番号を使用することもあります。このような企業では、事業を行う各地域において、異なるプライベートAS番号を使用している場合があります。どのような実装でも、インターネットにプライベートAS番号を知らせることは避けなければなりません。サービスプロバイダは、 remove-private ステートメントを使用して、インターネットへのプライベートAS番号のアドバタイズを防止できます。

企業のシナリオにおいて、社内に複数のAS番号があり、そのうちのいくつかはプライベートAS番号で、1つはパブリックAS番号が付いているとします。パブリックAS番号を持つものは、サービスプロバイダに直接接続しています。サービスプロバイダに直接接続するASでは、 remove-private ステートメントを使用して、サービスプロバイダに送信されるアドバタイズメント内のプライベートAS番号を除外できます。

AS番号は、ASパスの左端(ASパスが最後に追加された位置)で始まるASパスから削除されます。ルーティングデバイスは、最初の非プライベートASまたはピアのプライベートASが見つかったときに、プライベートASの検索を停止します。ASパスに外部BGP(EBGP)ネイバーのAS番号が含まれている場合、BGPはプライベートAS番号を削除しません。

注:

Junos OS 10.0R2以降では、ASパスのAS番号と一致するAS番号を持つEBGPピアにプレフィックスを送信する必要がある場合は、remove-privateステートメントではなくas-overrideステートメントを使用することを検討してください。

この操作は、該当する場合、コンフェデレーションメンバーのASがASパスから削除された後に実行されます。

ソフトウェアは、Internet Assigned Numbers Authority(IANA)によって割り当てられた番号のドキュメントに定義されている範囲、つまりプライベートと見なされるAS番号のセットを認識した上で事前設定されています。プライベートとして予約された16ビットAS番号のセットは、64,512〜65,534の範囲に含まれます。プライベートとして予約された32ビットAS番号は、4,200,000,000から4,294,967,294までが範囲に含まれます。

例:ASパスからプライベートAS番号を削除する

ここでは、アドバタイズされたASパスからプライベートAS番号を削除することで、プライベートAS番号のインターネットへの通知を回避する例を示しています。

要件

この例を構成する前に、デバイスの初期化以上の特別な構成は必要ありません。

概要

サービスプロバイダとエンタープライズネットワークは、 remove-private ステートメントを使用して、インターネットへのプライベートAS番号のアドバタイズを防止します。remove-private ステートメントは、アウトバウンド方向で動作します。パブリックAS番号を持ち、かつプライベートAS番号を持つ1つ以上のデバイスに接続されたデバイス上に、 remove-private ステートメントを設定します。一般的に、プライベートAS番号を持つデバイスにはこのステートメントを設定しません。

図 8サンプルのトポロジーを示しています。

図 8: アドバタイズされたASパスからプライベートASを削除するためのトポロジーアドバタイズされたASパスからプライベートASを削除するためのトポロジー

この例では、プライベートAS番号 65530を使用して、デバイスR1がサービスプロバイダに接続しています。この例では、デバイスR1のプライベートAS番号がデバイスR2に通知されないようにするために、デバイスISPに設定された remove-private ステートメントを示しています。デバイスR2は、サービスプロバイダのAS番号のみを確認します。

注:

BGP オプション remove-private を追加または削除すると、影響を受ける BGP ピアリング セッションがフラップします。

設定

CLIクイック構成

この例をすばやく設定するには、次のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク構成に合わせて必要な詳細を変更し、[edit]階層レベルのCLIにコマンドをコピー&ペーストしてください。

デバイスR1

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 1 family inet address 192.168.10.1/24
set interfaces lo0 unit 1 family inet address 10.10.10.1/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext peer-as 100
set protocols bgp group ext neighbor 192.168.10.10
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 192.168.20.0/24 next-hop 192.168.10.10
set routing-options autonomous-system 65530

デバイスISP

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 2 family inet address 192.168.10.10/24
set interfaces fe-1/2/1 unit 3 family inet address 192.168.20.20/24
set interfaces lo0 unit 2 family inet address 10.10.0.1/32
set protocols bgp group ext type external
set protocols bgp group ext neighbor 192.168.10.1 peer-as 65530
set protocols bgp group ext neighbor 192.168.20.1 remove-private
set protocols bgp group ext neighbor 192.168.20.1 peer-as 200
set routing-options autonomous-system 100

デバイスR2

content_copy zoom_out_map
set interfaces fe-1/2/0 unit 4 family inet address 192.168.20.1/24
set interfaces lo0 unit 3 family inet address 10.10.20.1/32
set protocols bgp group ext type external
set protocols bgp group ext export send-direct
set protocols bgp group ext export send-static
set protocols bgp group ext peer-as 100
set protocols bgp group ext neighbor 192.168.20.20
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 then accept
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 then accept
set routing-options static route 192.168.10.0/24 next-hop 192.168.20.20
set routing-options autonomous-system 200

デバイスISP

ステップバイステップでの手順

次の例では、設定階層のいくつかのレベルに移動する必要があります。CLIのナビゲーションについては、Junos OS CLIユーザーガイド設定モードでCLIエディターを使用する を参照してください。

デバイスISPを設定するには:

  1. インターフェイスを設定します。

    content_copy zoom_out_map
    [edit interfaces]
    user@ISP# set fe-1/2/0 unit 2 family inet address 192.168.10.10/24
    user@ISP# set fe-1/2/1 unit 3 family inet address 192.168.20.20/24
    user@ISP# set lo0 unit 2 family inet address 10.10.0.1/32
    
  2. EBGPを設定します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@ISP# set type external
    user@ISP# set neighbor 192.168.10.1 peer-as 65530
    user@ISP# set neighbor 192.168.20.1 peer-as 200
    
  3. 自律システム(AS)200(デバイスR2)のネイバーに対して、プライベートAS番号をアドバタイズされたAS番号から削除します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@ISP# set neighbor 192.168.20.1 remove-private
    
  4. AS番号を設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@ISP# set autonomous-system 100
    
結果

コンフィギュレーションモードから、show interfacesshow protocols、、およびの各コマshow routing-optionsンドを入力し、コンフィギュレーションを確認します。出力結果に意図した設定内容が表示されない場合は、この例の手順を繰り返して設定を修正します。

content_copy zoom_out_map
user@ISP# show interfaces
fe-1/2/0 {
    unit 2 {
        family inet {
            address 192.168.10.10/24;
        }
    }
}
fe-1/2/1 {
    unit 3 {
        family inet {
            address 192.168.20.20/24;
        }
    }
}
lo0 {
    unit 2 {
        family inet {
            address 10.10.0.1/32;
        }
    }
}
content_copy zoom_out_map
user@ISP# show protocols
bgp {
    group ext {
        type external;
        neighbor 192.168.10.1 {
            peer-as 65530;
        }
        neighbor 192.168.20.1 {
            remove-private;
            peer-as 200;
        }
    }
}
content_copy zoom_out_map
user@ISP# show routing-options
autonomous-system 100;

デバイスの設定が完了したら、設定モードから commit を入力します。デバイスR1とデバイスR2の設定を繰り返し、必要に応じてインターフェイス名とIPアドレスを変更し、ルーティングポリシー設定を追加します。

検証

設定が正常に機能していることを確認します。

ネイバーステータスの確認

目的

デバイスISPで、デバイスR2とのネイバーセッションで remove-private 設定が有効になっていることを確認します。

アクション

動作モードからshow bgp neighbor 192.168.20.1コマンドを入力します。

content_copy zoom_out_map
user@ISP> show bgp neighbor 192.168.20.1
Peer: 192.168.20.1+179 AS 200  Local: 192.168.20.20+60216 AS 100  
  Type: External    State: Established    Flags: <ImportEval Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Preference RemovePrivateAS PeerAS Refresh>
  Holdtime: 90 Preference: 170
  Number of flaps: 0
  Peer ID: 10.10.20.1      Local ID: 10.10.0.1         Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 0   
  BFD: disabled, down
  Local Interface: fe-1/2/1.3                       
  NLRI for restart configured on peer: inet-unicast
  NLRI advertised by peer: inet-unicast
  NLRI for this session: inet-unicast
  Peer supports Refresh capability (2)
  Stale routes from peer are kept for: 300
  Peer does not support Restarter functionality
  NLRI that restart is negotiated for: inet-unicast
  NLRI of received end-of-rib markers: inet-unicast
  NLRI of all end-of-rib markers sent: inet-unicast
  Peer supports 4 byte AS extension (peer-as 200)
  Peer does not support Addpath
  Table inet.0 Bit: 10001
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              1
    Received prefixes:            3
    Accepted prefixes:            2
    Suppressed due to damping:    0
    Advertised prefixes:          1
  Last traffic (seconds): Received 10   Sent 16   Checked 55  
  Input messages:  Total 54     Updates 3       Refreshes 0     Octets 1091
  Output messages: Total 54     Updates 1       Refreshes 0     Octets 1118
  Output Queue[0]: 0
意味

[ RemovePrivateAS オプションは、デバイス ISP に予期される設定があることを示します。

ルーティングテーブルのチェック

目的

デバイスに予想されたルートとASパスがあることを確認します。

アクション

動作モードからshow route protocol bgpコマンドを入力します。

content_copy zoom_out_map
user@R1> show route protocol bgp
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.10.20.1/32      *[BGP/170] 00:28:57, localpref 100
                      AS path: 100 200 I
                    > to 192.168.10.10 via fe-1/2/0.1
content_copy zoom_out_map
user@ISP> show route protocol bgp

inet.0: 7 destinations, 11 routes (7 active, 0 holddown, 2 hidden)
+ = Active Route, - = Last Active, * = Both

10.10.10.1/32      *[BGP/170] 00:29:40, localpref 100
                      AS path: 65530 I
                    > to 192.168.10.1 via fe-1/2/0.2
10.10.20.1/32      *[BGP/170] 00:29:36, localpref 100
                      AS path: 200 I
                    > to 192.168.20.1 via fe-1/2/1.3
192.168.10.0/24     [BGP/170] 00:29:40, localpref 100
                      AS path: 65530 I
                    > to 192.168.10.1 via fe-1/2/0.2
192.168.20.0/24     [BGP/170] 00:29:36, localpref 100
                      AS path: 200 I
                    > to 192.168.20.1 via fe-1/2/1.3
content_copy zoom_out_map
user@R2> show route protocol bgp
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.10.10.1/32      *[BGP/170] 00:29:53, localpref 100
                      AS path: 100 I
                    > to 192.168.20.20 via fe-1/2/0.4
意味

デバイスISPは、デバイスR1へのASパス内にプライベートAS番号65530を持っています。ただし、デバイスISPは、このプライベートAS番号をデバイスR2にアドバタイズしません。これは、デバイスR2のルーティングテーブルに表示されます。デバイスR2のデバイスR1へのパスには、デバイスISPのAS番号のみが含まれます。

remove-privateステートメントの非アクティブ化時にASパスを確認する

目的

remove-privateステートメントなしで、プライベートAS番号がデバイスR2のルーティングテーブルに表示されていることを確認します。

アクション

デバイスISPの設定モードから、 deactivate remove-private コマンドを入力し、デバイスR2のルーティングテーブルを再確認します。

content_copy zoom_out_map
[protocols bgp group ext neighbor 192.168.20.1]
user@ISP# deactivate remove-private
user@ISP# commit
content_copy zoom_out_map
user@R2> show route protocol bgp
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.10.10.1/32      *[BGP/170] 00:00:54, localpref 100
                      AS path: 100 65530 I
                    > to 192.168.20.20 via fe-1/2/0.4
意味

プライベートAS番号65530は、デバイスR2のデバイスR1へのASパスに表示されます。

変更履歴

サポートされる機能は、使用しているプラットフォームとリリースによって決まります。 特定の機能がお使いのプラットフォームでサポートされているかどうかを確認するには、 Feature Explorer をご利用ください。

リリース
説明
20.2R1
リリース20.2R1以降、Junos OSはAIGPメトリックのMEDへの変換をサポートしています。この機能は、最適経路の選択に使用されるエンドツーエンドのAIGPメトリック値をMEDに伝送させたい場合に有効にできます。
footer-navigation