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

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

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

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
このページで
keyboard_arrow_right

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

starstarstarstarstar
Go to English page
免責事項:

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

例:ルーティング テーブルにおけるプレフィックスの条件付きインストールを可能にする条件付きアドバタイズのルーティング ポリシーの設定

date_range 19-Jan-25

この例では、BGPエクスポートポリシーを使用して、ルーティングテーブルでのプレフィックスの条件付きインストールを設定する方法を示しています。

要件

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

  • Mシリーズマルチサービスエッジルーター、MXシリーズ5Gユニバーサルルーティングプラットフォーム、またはTシリーズコアルーター

  • Junos OS リリース 9.0 以降

概要

この例では、3つの異なる自律システム(AS)にある3つのルーターが接続され、BGPプロトコルで設定されています。アップストリームルーターであるルーターラベル付きインターネットは、lo0.0ループバックインターフェイスで設定された5つのアドレス(172.16.11.1/32、172.16.12.1/32、172.16.13.1/32、172.16.14.1/32、および172.16.15.1/32)があり、追加のループバックアドレス(192.168.9.1/32) がルーターIDとして設定されています。これら6つのアドレスは、インターネットに接続されたルーターのBGPルーティングテーブルの内容をエミュレートするためにBGPにエクスポートされて、Northにアドバタイズされます。

NorthルーターとSouthルーターは、それぞれ10.0.89.12/30および10.0.78.12/30ネットワークを使用し、各ループバックアドレスに対して192.168.7.1と192.168.8.1を使用します。

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

図 1: プレフィックスの条件付きインストールプレフィックスの条件付きインストール

ルーターNorthは、学習した172.16.0.0/16 BGPルートをルーターインターネットからルーターSouthにエクスポートします。これらのルートは、インターネットルーターのドメインが所有するルートを表す場合があります。さらに、特定の172.16.11.1/32ルートが存在する場合、ルーターNorthはデフォルトルートもアドバタイズします。172.16.11.1ルートは、完全なインターネット接続を提供するティア1トランジットピアリングプロバイダへのインターネットルーターのリンクを表す場合があります。

ルーターSouthは、6つのルートすべてを受信しますが、ルーティングテーブルにデフォルトルートと1つの他の特定のルート(172.16.11.1/32)のみをインストールする必要があります。

要約すると、この例は次の要件を満たしています:

  • Northでは、すべての172.16/16プレフィックスを送信します。さらに、特定のルートがinet.0ルーティングテーブル(この例では172.16.11.1/32)に存在する場合にのみ、0/0をSouthに送信します。

  • Southでは、ルーティングと転送テーブルでデフォルトルートと172.16.11.1/32ルートを受け入れ、インストールします。その他すべてのルートをドロップします。Southが、完全なインターネットルーティングテーブルを受け入れられないローエンドデバイスかもしれないということを考慮してください。結果として、オペレータはSouthにデフォルトルートと1つの他の特定のプレフィックスのみを割り当てたいと考えています。

最初の要件は、Northのエクスポートポリシーで満たされています:

content_copy zoom_out_map
user@North# show policy-options
policy-statement conditional-export-bgp {
    term prefix_11 {
        from {
            protocol bgp;
            route-filter 172.16.0.0/16 orlonger;
        }
        then accept;
    }
    term conditional-default {
        from {
            route-filter 0.0.0.0/0 exact;
            condition prefix_11;
        }
        then accept;
    }
    term others {
        then reject;
    }
}
condition prefix_11 {
    if-route-exists {
        172.16.11.1/32;
        table inet.0;
    }
}

条件付きエクスポートポリシーの論理は、以下のように要約できます:0/0が存在する場合、172.16.11.1/32が存在した場合、0/0プレフィックスを送信します。つまり、172.16.11.1/32が存在しない場合、0/0を送信しないということです。

2つ目の要件は、Southのインポートポリシーで満たされています:

content_copy zoom_out_map
user@South# show policy-options
policy-statement import-selected-routes {
    term 1 {
        from {
            rib inet.0;
            neighbor 10.0.78.14;
            route-filter 0.0.0.0/0 exact;
            route-filter 172.16.11.1/32 exact;
        }
        then accept;
    }
    term 2 {
        then reject;
    }
}

この例では、Southのインポートポリシーの結果として、4つのルートがドロップされます。これは、Northのエクスポポリシーが、インターネットから受信したルートをリークし、Southのインポートポリシーがこれらのルートのいくつかを除外しているためです。

Junos OSでは、インポートポリシー(インバウンドルートフィルター)がルートを拒否する、トラフィック転送に使用しない、他のピアへのアドバタイズに含まれないこと、ルーターがこれらのルートを非表示ルートとして保持することを理解しておくことが重要です。これらの非表示ルートはポリシーまたはルーティング目的に使用できません。ただし、ルーターでメモリ領域を取りません。ルートをフィルタリングして、メモリに保管され、ルーターによって処理された情報量を制御するサービスプロバイダは、インポートポリシーによって拒否されたルートをルーターで完全にドロップすることができます。

非表示のルートは、コマshow route receive-protocol bgp neighbor-address hiddenンドを使用して表示することができます。その後、非表示のルートは、またはの階[edit protocols bgp group group-name]層レベル[edit protocols bgp]でステートkeep all | noneメントを設定することにより、ルーティングテーブルから保持またはドロップすることができます。

BGPルート保持のルールは、以下のとおりです:

  • デフォルトでは、BGPから学習したルートはすべて保持されますが、ASパスがループするルートは除外されます。(ASパスにはローカルASが含まれます。)

  • ステートkeep allメントを設定することで、BGPから学習したすべてのルートは、ASパスにローカルASを持つルートでも保持されます。

  • keep noneステートメントを設定することで、BGPはピアから受信したルート、およびインポートポリシーまたはその他のサニティーチェックによって拒否されたルートを破棄します。このステートメントが設定され、インバウンドポリシーが変更された場合、Junos OSがピアによってアドバタイズされたすべてのルートを再アドバタイズします。

keep allまたはを設定し、ピアがルート更新をサポートkeep noneする場合、ローカルスピーカーはリフレッシュメッセージを送信し、インポート評価を実行します。これらのピアに対してセッションは再起動されません。ピアが更新をサポートするかどうかを確認するには、コマshow bgp neighborンドの出力Peer supports Refresh capabilityでをチェックします。

注意:

keep allまたはkeep noneを設定し、ピアがセッション再起動をサポートしない場合、関連するBGPセッションが再起動します(フラップされる)。

トポロジー

設定

CLIクイック構成

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

ルーターインターネット

content_copy zoom_out_map
set interfaces lo0 unit 0 family inet address 172.16.11.1/32
set interfaces lo0 unit 0 family inet address 172.16.12.1/32
set interfaces lo0 unit 0 family inet address 172.16.13.1/32
set interfaces lo0 unit 0 family inet address 172.16.14.1/32
set interfaces lo0 unit 0 family inet address 172.16.15.1/32
set interfaces lo0 unit 0 family inet address 192.168.9.1/32
set interfaces fe-0/1/3 unit 0 family inet address 10.0.89.14/30 
set protocols bgp group toNorth local-address 10.0.89.14
set protocols bgp group toNorth peer-as 65200
set protocols bgp group toNorth neighbor 10.0.89.13
set protocols bgp group toNorth export into-bgp 
set policy-options policy-statement into-bgp term 1 from interface lo0.0
set policy-options policy-statement into-bgp term 1 then accept 
set routing-options router-id 192.168.9.1
set routing-options autonomous-system 65300

ルーターNorth

content_copy zoom_out_map
set interfaces fe-1/3/1 unit 0 family inet address 10.0.78.14/30
set interfaces fe-1/3/0 unit 0 family inet address 10.0.89.13/30  
set interfaces lo0 unit 0 family inet address 192.168.8.1/32
set protocols bgp group toInternet local-address 10.0.89.13
set protocols bgp group toInternet peer-as 65300
set protocols bgp group toInternet neighbor 10.0.89.14  
set protocols bgp group toSouth local-address 10.0.78.14
set protocols bgp group toSouth export conditional-export-bgp
set protocols bgp group toSouth peer-as 65100
set protocols bgp group toSouth neighbor 10.0.78.13
set policy-options policy-statement conditional-export-bgp term prefix_11 from protocol bgp
set policy-options policy-statement conditional-export-bgp term prefix_11 from route-filter 172.16.0.0/16 orlonger
set policy-options policy-statement conditional-export-bgp term prefix_11 then accept
set policy-options policy-statement conditional-export-bgp term conditional-default from route-filter 0.0.0.0/0 exact
set policy-options policy-statement conditional-export-bgp term conditional-default from condition prefix_11
set policy-options policy-statement conditional-export-bgp term conditional-default then accept
set policy-options policy-statement conditional-export-bgp term others then reject
set policy-options condition prefix_11 if-route-exists 172.16.11.1/32
set policy-options condition prefix_11 if-route-exists table inet.0
set routing-options static route 0/0 reject
set routing-options router-id 192.168.8.1
set routing-options autonomous-system 65200

ルーターSouth

content_copy zoom_out_map
set interfaces fe-0/1/2 unit 0 family inet address 10.0.78.13/30 
set interfaces lo0 unit 0 family inet address 192.168.7.1/32
set protocols bgp group toNorth local-address 10.0.78.13
set protocols bgp group toNorth import import-selected-routes
set protocols bgp group toNorth peer-as 65200
set protocols bgp group toNorth neighbor 10.0.78.14
set policy-options policy-statement import-selected-routes term 1 from neighbor 10.0.78.14
set policy-options policy-statement import-selected-routes term 1 from route-filter 172.16.11.1/32 exact
set policy-options policy-statement import-selected-routes term 1 from route-filter 0.0.0.0/0 exact
set policy-options policy-statement import-selected-routes term 1 then accept
set policy-options policy-statement import-selected-routes term 2 then reject
set routing-options router-id 192.168.7.1
set routing-options autonomous-system 65100

プレフィックスの条件付きインストールの設定

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

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

プレフィックスの条件付きインストールを設定するには:

  1. 3つのルーター間のリンクを形成するルーターインターフェイスを設定します。

    content_copy zoom_out_map
    Router Internet
    [edit interfaces]
    user@Internet# set fe-0/1/3 unit 0 family inet address 10.0.89.14/30 
    
    content_copy zoom_out_map
    Router North
    [edit interfaces]
    user@North# set fe-1/3/1 unit 0 family inet address 10.0.78.14/30
    user@North# set fe-1/3/0 unit 0 family inet address 10.0.89.13/30  
    
    content_copy zoom_out_map
    Router South
    [edit interfaces]
    user@South# set fe-0/1/2 unit 0 family inet address 10.0.78.13/30 
    
  2. ルーターインターネットで5つのループバックインターフェイスアドレスを設定して、ルーターSouthのルーティングテーブルにインポートされるインターネットから学習するBGPルートをエミュレートし、ルーターIDとして設定する追加アドレス(192.168.9.1/32)を設定します。

    content_copy zoom_out_map
    Router Internet
    [edit interfaces lo0 unit 0 family inet]
    user@Internet# set address 172.16.11.1/32
    user@Internet# set address 172.16.12.1/32
    user@Internet# set address 172.16.13.1/32
    user@Internet# set address 172.16.14.1/32
    user@Internet# set address 172.16.15.1/32
    user@Internet# set address 192.168.9.1/32
    

    また、ルーターNorthとSouthでループバックインターフェイスアドレスを設定します。

    content_copy zoom_out_map
    Router North
    [edit interfaces lo0 unit 0 family inet]
    user@North# set address 192.168.8.1/32
    
    content_copy zoom_out_map
    Router South
    [edit interfaces lo0 unit 0 family inet]
    user@South# set address 192.168.7.1/32
    
  3. ルーターNorthで、ルーターSouthにアドバタイズされる静的デフォルトルートを設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@North# set static route 0/0 reject
    
  4. ルーターNorthのルーティングテーブルからプレフィックスをエクスポートする条件を定義します。

    content_copy zoom_out_map
    [edit policy-options condition prefix_11]
    user@North# set if-route-exists 172.16.11.1/32
    user@North# set if-route-exists table inet.0
    
  5. ルーターインターネットとNorthで、それぞれエクスポートポリシー(into-bgpconditional-export-bgp)を定義し、BGPにルートをアドバタイズします。

    注:

    エクスポートポリシーで、条件prefix_11(ステップで設定4)を参照する必要があります。

    content_copy zoom_out_map
    Router Internet
    [edit policy-options policy-statement into-bgp ]
    user@Internet# set term 1 from interface lo0.0
    user@Internet# set term 1 then accept 
    
    content_copy zoom_out_map
    Router North
    [edit policy-options policy-statement conditional-export-bgp]
    user@North# set  term prefix_11 from protocol bgp
    user@North# set  term prefix_11 from route-filter 172,16.0.0/16 orlonger
    user@North# set  term prefix_11 then accept
    user@North# set  term conditional-default from route-filter 0.0.0.0/0 exact
    user@North# set  term conditional-default from condition prefix_11
    user@North# set  term conditional-default then accept
    user@North# set term others then reject
    
  6. ルーターSouthで、インポートポリシー(import-selected-routes)を定義して、ルーターNorthによってアドバタイズされたルートの一部をルーティングテーブルにインポートします。

    content_copy zoom_out_map
    [edit policy-options policy-statement import-selected-routes ]
    user@South# set term 1 from neighbor 10.0.78.14
    user@South# set term 1 from route-filter 172.16.11.1/32 exact
    user@South# set term 1 from route-filter 0.0.0.0/0 exact
    user@South# set term 1 then accept
    user@South# set term 2 then reject
    
  7. 3つのルーターすべてでBGPを設定し、自律システム間でプレフィックスのフローを有効にします。

    注:

    プレフィックスアドバタイズメントが行われるように、定義したインポートおよびエクスポートポリシーをそれぞれ、対応するBGPグループに適用してください。

    content_copy zoom_out_map
    Router Internet
    [edit protocols bgp group toNorth]
    user@Internet# set local-address 10.0.89.14
    user@Internet# set peer-as 65200
    user@Internet# set neighbor 10.0.89.13
    user@Internet# set export into-bgp 
    
    content_copy zoom_out_map
    Router North
    [edit protocols bgp group toInternet]
    user@North# set local-address 10.0.89.13
    user@North# set peer-as 65300
    user@North# set neighbor 10.0.89.14  
    
    content_copy zoom_out_map
    [edit protocols bgp group toSouth]
    user@North# set local-address 10.0.78.14
    user@North# set peer-as 65100
    user@North# set neighbor 10.0.78.13
    user@North# set export conditional-export-bgp
    
    content_copy zoom_out_map
    Router South
    [edit protocols bgp group toNorth]
    user@South# set local-address 10.0.78.13
    user@South# set peer-as 65200
    user@South# set neighbor 10.0.78.14
    user@South# set import import-selected-routes
    
  8. 3つすべてのルーターに、機器のルーターIDと自律システム番号を設定します。

    注:

    この例では、ルーターIDがルーターのlo0.0インターフェイスで設定されたIPアドレスに基づいて設定されています。

    content_copy zoom_out_map
    Router Internet
    [edit routing options]
    user@Internet# set router-id 192.168.9.1
    user@Internet# set autonomous-system 65300
    
    content_copy zoom_out_map
    Router North
    [edit routing options]
    user@North# set router-id 192.168.8.1
    user@North# set autonomous-system 65200
    
    content_copy zoom_out_map
    Router South
    [edit routing options]
    user@South# set router-id 192.168.7.1
    user@South# set autonomous-system 65100
    

結果

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

デバイスインターネット

content_copy zoom_out_map
user@Internet# show interfaces
fe-0/1/3 {
    unit 0 {
        family inet {
            address 10.0.89.14/30;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 172.16.11.1/32;
            address 172.16.12.1/32;
            address 172.16.13.1/32;
            address 172.16.14.1/32;
            address 172.16.15.1/32;
            address 192.168.9.1/32;
        }
    }
}
content_copy zoom_out_map
user@Internet# show protocols bgp
group toNorth {
    local-address 10.0.89.14;
    export into-bgp;
    peer-as 65200;
    neighbor 10.0.89.13;
}
content_copy zoom_out_map
user@Internet# show policy-options
policy-statement into-bgp {
    term 1 {
        from interface lo0.0;
        then accept;
    }
}
content_copy zoom_out_map
user@Internet# show routing-options
router-id 192.168.9.1;
autonomous-system 65300;

デバイスNorth

content_copy zoom_out_map
user@North# show interfaces
fe-1/3/1 {
    unit 0 {
        family inet {
            address 10.0.78.14/30;
        }
    }
}
fe-1/3/0 {
    unit 0 {
        family inet {
            address 10.0.89.13/30;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 192.168.8.1/32;
        }
    }
}
content_copy zoom_out_map
user@North# show protocols bgp
group toInternet {
    local-address 10.0.89.13;
    peer-as 65300;
    neighbor 10.0.89.14;
}
group toSouth {
    local-address 10.0.78.14;
    export conditional-export-bgp;
    peer-as 65100;
    neighbor 10.0.78.13;
}
content_copy zoom_out_map
user@North# show policy-options
policy-statement conditional-export-bgp {
    term prefix_11 {
        from {
            protocol bgp;
            route-filter 172.16.0.0/16 orlonger;
        }
        then accept;
    }
    term conditional-default {
        from {
            route-filter 0.0.0.0/0 exact;
            condition prefix_11;
        }
        then accept;
    }
    term others {
        then reject;
    }
}
condition prefix_11 {
    if-route-exists {
        172.16.11.1/32;
        table inet.0;
    }
}
content_copy zoom_out_map
user@North# show routing-options
static {
    route 0.0.0.0/0 reject;
}
router-id 192.168.8.1;
autonomous-system 65200;

デバイスSouth

content_copy zoom_out_map
user@South# show interfaces
fe-0/1/2 {
    unit 0 {
        family inet {
            address 10.0.78.13/30;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 192.168.7.1/32;
        }
    }
}
content_copy zoom_out_map
user@South# show protocols bgp
bgp {
    group toNorth {
        local-address 10.0.78.13;
        import import-selected-routes;
        peer-as 65200;
        neighbor 10.0.78.14;
    }
}
content_copy zoom_out_map
user@South# show policy-options
policy-statement import-selected-routes {
    term 1 {
        from {
            neighbor 10.0.78.14;
            route-filter 172.16.11.1 exact;
            route-filter 0.0.0.0/0 exact;
        }
        then accept;
    }
    term 2 {
        then reject;
    }
}
content_copy zoom_out_map
user@South# show routing-options
router-id 192.168.7.1;
autonomous-system 65100;

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

検証

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

BGPの検証

目的

3つのルーター間でBGPセッションが確立されたことを確認します。

アクション

オペレーショナルモードから、show bgp neighbor neighbor-addressコマンドを実行します。

  1. ルーターインターネットでBGPセッションをチェックして、ルーターNorthがネイバーであることを確認します。

    content_copy zoom_out_map
    user@Internet> show bgp neighbor 10.0.89.13 
    Peer: 10.0.89.13+179 AS 65200    Local: 10.0.89.14+56187 AS 65300  
      Type: External    State: Established    Flags: [ImportEval Sync]
      Last State: OpenConfirm   Last Event: RecvKeepAlive
      Last Error: None
      Export: [ into-bgp ] 
      Options: [Preference LocalAddress PeerAS Refresh]
      Local Address: 10.0.89.14 Holdtime: 90 Preference: 170
      Number of flaps: 0
      Peer ID: 192.168.8.1     Local ID: 192.168.9.1       Active Holdtime: 90
      Keepalive Interval: 30         Group index: 0    Peer index: 0   
      BFD: disabled, down
      Local Interface: fe-0/1/3.0                      
      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 65200)
      Peer does not support Addpath
      Table inet.0 Bit: 10000
        RIB State: BGP restart is complete
        Send state: in sync
        Active prefixes:              0
        Received prefixes:            0
        Accepted prefixes:            0
        Suppressed due to damping:    0
        Advertised prefixes:          6
      Last traffic (seconds): Received 9    Sent 18   Checked 28  
      Input messages:  Total 12     Updates 1       Refreshes 0     Octets 232
      Output messages: Total 14     Updates 1       Refreshes 0     Octets 383
      Output Queue[0]: 0
  2. ルーターNorthでBGPセッションをチェックして、ルーターインターネットがネイバーであることを確認します。

    content_copy zoom_out_map
    user@North> show bgp neighbor 10.0.89.14 
    Peer: 10.0.89.14+56187 AS 65300  Local: 10.0.89.13+179 AS 65200  
      Type: External    State: Established    Flags: [ImportEval Sync]
      Last State: OpenConfirm   Last Event: RecvKeepAlive
      Last Error: None
      Options: [Preference LocalAddress PeerAS Refresh]
      Local Address: 10.0.89.13 Holdtime: 90 Preference: 170
      Number of flaps: 0
      Peer ID: 192.168.9.1     Local ID: 192.168.8.1       Active Holdtime: 90
      Keepalive Interval: 30         Group index: 0    Peer index: 0   
      BFD: disabled, down
      Local Interface: fe-1/3/0.0                      
      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 65300)
      Peer does not support Addpath
      Table inet.0 Bit: 10001
        RIB State: BGP restart is complete
        Send state: in sync
        Active prefixes:              6
        Received prefixes:            6
        Accepted prefixes:            6
        Suppressed due to damping:    0
        Advertised prefixes:          0
      Last traffic (seconds): Received 14   Sent 3    Checked 3   
      Input messages:  Total 16     Updates 2       Refreshes 0     Octets 402
      Output messages: Total 15     Updates 0       Refreshes 0     Octets 348
      Output Queue[0]: 0

これらの出力で、以下のフィールドをチェックして、BGPセッションが確立されたことを確認します。

  • Peer—ピアAS番号が表示されているかどうか確認します。

  • Local—ローカルAS番号が表示されているかどうか確認します。

  • State—値がであることを確認しますEstablished。そうでない場合、設定をチェックし、出力フィールドの詳細についてshow bgp neighborを参照してください。

同様に、ルーターNorthとSouthが互いのピア関係を形成していることを確認します。

意味

BGPセッションは、3つのルーター間で確立されています。

ルーターインターネットからルーターNorthへのプレフィックスアドバタイズの検証

目的

ルーターインターネットから送信されたルートが、ルーターNorthによって受信されていることを確認します。

アクション

  1. ルーターインターネットでのオペレーショナルモードから、show route advertising-protocol bgp neighbor-addressコマンドを実行します。

    content_copy zoom_out_map
    user@Internet> show route advertising-protocol bgp 10.0.89.13
    inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 172.16.11.1/32             Self                                    I
    * 172.16.12.1/32             Self                                    I
    * 172.16.13.1/32             Self                                    I
    * 172.16.14.1/32             Self                                    I
    * 172.16.15.1/32             Self                                    I
    * 192.168.9.1/32             Self                                    I

    出力では、ルーターインターネットがルート172.16.11.1/32、172.16.12.1/32、172.16.13.1/32、172.16.14.1/32、172.16.15.1/32、192.168.9.1/32(ルーターIDとして使用されるループバックアドレス)をルーターNorthにアドバタイズすることを確認します。

  2. ルーターNorthでの運用モードから、コマshow route receive-protocol bgp neighbor-addressンドを実行します。

    content_copy zoom_out_map
    user@North> show route receive-protocol bgp 10.0.89.14
    inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 172.16.11.1/32             10.0.89.14                              65300 I
    * 172.16.12.1/32             10.0.89.14                              65300 I
    * 172.16.13.1/32             10.0.89.14                              65300 I
    * 172.16.14.1/32             10.0.89.14                              65300 I
    * 172.16.15.1/32             10.0.89.14                              65300 I
    * 192.168.9.1/32             10.0.89.14                              65300 I
    

    出力では、ルーターNorthがルーターインターネットによってアドバタイズされたすべてのルートを受信したことを確認します。

意味

ルーターインターネットによって送信されたプレフィックスは、ルーターNorthのルーティングテーブルに正常にインストールされました。

ルーターNorthからルーターSouthへのプレフィックスアドバタイズメントの検証

目的

ルーターインターネットから受信したルートと静的デフォルトルートが、ルーターNorthからルーターSouthでアドバタイズされていることを確認します。

アクション

  1. ルーターNorthでの運用モードから、コマshow route 0/0 exactンドを実行します。

    content_copy zoom_out_map
    user@North> show route 0/0 exact
    inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    0.0.0.0/0          *[Static/5] 00:10:22
                             Reject

    出力では、ルーターNorthのルーティングテーブルでの静的デフォルルート(0.0.0.0/0)の存在を検証します。

  2. ルーターNorthでの運用モードから、コマshow route advertising-protocol bgp neighbor-addressンドを実行します。

    content_copy zoom_out_map
    user@North> show route advertising-protocol bgp 10.0.78.13
    inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 0.0.0.0/0               Self                                    I
    * 172.16.11.1/32             Self                                 65300 I
    * 172.16.12.1/32             Self                                 65300 I
    * 172.16.13.1/32             Self                                 65300 I
    * 172.16.14.1/32             Self                                 65300 I
    * 172.16.15.1/32             Self                                 65300 I

    出力では、ルーターNorthがルーターインターネットから受信した静的ルートと172.16.11.1/32ルート、その他の多くのルートを、ルーターSouthにアドバタイズしていることを確認します。

プレフィックスのインストールに対するBGPインポートポリシーの検証

目的

BGPインポートポリシーにより、必要なプレフィックスが正しくインストールされていることを確認します。

アクション

ルーターNorthからの静的デフォルトルートとルーターSouthからの172.16.11.1/32ルートのみがルーティングテーブルにインストールされているかどうか、ルーターSouthのインポートポリシーが動作しているかどうかを確認します。

オペレーショナルモードから、show route receive-protocol bgp neighbor-addressコマンドを実行します。

content_copy zoom_out_map
user@South> show route receive-protocol bgp 10.0.78.14 
inet.0: 10 destinations, 11 routes (6 active, 0 holddown, 4 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
* 0.0.0.0/0               10.0.78.14                              65200 I
* 172.16.11.1/32          10.0.78.14                              65200 65300 I

出力では、BGPインポートポリシーがルーターSouthで動作していること、さらにルーターNorthからの0.0.0.0/0の静的デフォルルルートと、ルーターインターネットからの172.16.11.1/32ルートのみがルーティングテーブルにリークされたことを確認します。

意味

設定されたBGPインポートポリシーにより、プレフィックスのインストールが成功しました。

ルーターNorthからルーターSouthへの条件付きエクスポートの検証

目的

デバイスインターネットが172.16.11.1/32ルートの送信を停止すると、デバイスNorthがデフォルト0/0ルートの送信を停止することを確認します。

アクション

  1. ループバックインターフェイスで172.16.11.1/32アドレスを無効にすることにより、デバイスインターネットが172.16.11.1/3ルートの送信を停止する原因となります。

    content_copy zoom_out_map
    [edit interfaces lo0 unit 0 family inet]
    user@Internet# deactivate address 172.16.11.1/32
    user@Internet# commit
    
  2. ルーターNorthでの運用モードから、コマshow route advertising-protocol bgp neighbor-addressンドを実行します。

    content_copy zoom_out_map
    user@North> show route advertising-protocol bgp 10.0.78.13
    inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 172.16.12.1/32             Self                                   65300 I
    * 172.16.13.1/32             Self                                   65300 I
    * 172.16.14.1/32             Self                                   65300 I
    * 172.16.15.1/32             Self                                   65300 I
    

    出力では、ルーターNorthがルーターSouthにデフォルトルートをアドバタイズしていないことを確認します。これは、172.16.11.1/32ルートが存在しない場合に予想される動作です。

  3. デバイスインターネットのループバックインターフェイスで、172.16.11.1/32アドレスを再有効化します。

    content_copy zoom_out_map
    [edit interfaces lo0 unit 0 family inet]
    user@Internet# activate address 172.16.11.1/32
    user@Internet# commit
    

ポリシーによって非表示とされているルートの存在の検証(オプション)

目的

ルーターSouthで設定されたインポートポリシーによって非表示とされているルートの存在を確認します。

注:

このセクションでは、ニーズに応じて設定にできる各種変更による効果を説明しています。

アクション

ルーターSouthのルーティングテーブルから非表示となっているルートを表示するには:

  • コマshow route receive-protocol bgp neighbor-addressンドのhiddenオプションを使用します。

  • インポートポリシーを無効にします。

  1. オペレーショナルモードから、コマshow route receive-protocol bgp neighbor-address hiddenンドを実行して、非表示ルートを表示します。

    content_copy zoom_out_map
    user@South> show route receive-protocol bgp 10.0.78.14 hidden 
    inet.0: 10 destinations, 11 routes (6 active, 0 holddown, 4 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
      172.16.12.1/32             10.0.78.14                            65200 65300 I
      172.16.13.1/32             10.0.78.14                            65200 65300 I
      172.16.14.1/32             10.0.78.14                            65200 65300 I
      172.16.15.1/32             10.0.78.14                            65200 65300 I
    
    

    出力では、ルーターSouthのインポートポリシー(172.16.12.1/32、172.16.13.1/32、172.16.16.14.1/32、および172.16.15.1/32)によって非表示となっているルートの存在を確認します。

  2. [edit protocols bgp group group-name]層レベルでステートdeactivate importメントを設定して、BGPインポートポリシーを無効にします。

    content_copy zoom_out_map
    [edit protocols bgp group toNorth]
    user@South# deactivate import
    user@South# commit
    
  3. インポートポリシーを無効にした後、オペレーショshow route receive-protocol bgp neighbor-addressナルモードコマンドを実行して、ルートをチェックします。

    content_copy zoom_out_map
    user@South> show route receive-protocol bgp 10.0.78.14
    inet.0: 10 destinations, 11 routes (10 active, 0 holddown, 0 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 0.0.0.0/0               10.0.78.14                              65200 I
    * 172.16.11.1/32          10.0.78.14                              65200 65300 I
    * 172.16.12.1/32          10.0.78.14                              65200 65300 I
    * 172.16.13.1/32          10.0.78.14                              65200 65300 I
    * 172.16.14.1/32          10.0.78.14                              65200 65300 I
    * 172.16.15.1/32          10.0.78.14                              65200 65300 I

    出力では、過去に非表示となっているルート(172.16.12.1/32、172.16.16.13.1/32、172.16.16.14.1/32、および172.16.16.15.1/32)の存在を確認します。

  4. BGPインポートポリシーを有効にし、階[edit protocols bgp group group-name]層レベルでそれぞれとステートkeep noneメントactivate importを設定することにより、ルーティングテーブルから非表示ルートを削除します。

    content_copy zoom_out_map
    [edit protocols bgp group toNorth]
    user@South# activate import
    user@South# set keep none
    user@South# commit
    
  5. オペレーショナルモードからshow route receive-protocol bgp neighbor-address hiddenコマンドを実行し、インポートポリシーを有効にし、keep noneステートメントを設定した後、ルートをチェックします。

    content_copy zoom_out_map
    user@South> show route receive-protocol bgp 10.0.78.14 hidden 
    
    inet.0: 6 destinations, 7 routes (6 active, 0 holddown, 0 hidden)

    出力では、設定されたステートkeep noneメントによりルーティングテーブルで非表示ルートが維持されていないことを確認します。

footer-navigation