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

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

アンケートの所要時間はおよそ 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が類似プロパティを持つルートを管理上グループ化するために使用するルート属性です。

要件

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

  • Junos OSリリース21.1R1のvMXを使用して、更新および再検証しました。

概要

コミュニティ属性の主な役割の1つに、ルートを関連付けるために使用する管理タグ値があります。通常、これらのルートはプロパティの一部を共有しますが、それは必須ではありません。コミュニティは、BGP内の柔軟なツールです。個々のコミュニティ値は、単一または複数のルートに割り当てることができます。1つのルートに、単一のコミュニティ値または複数の値を割り当てることができます。ネットワークは、このコミュニティ属性を使用して、管理ルーティングポリシーの実装をサポートします。ルートに割り当てられた値を用いて、ネットワークへの受け入れ、ネットワークからの拒否、属性の変更を許可します。

図 1では、デバイスR1、R2、R3が自律システム(AS)64510の内部BGP(IBGP)ピアとなっています。デバイスR4は、AS 64511から172.16.0.0/21アドレススペースをアドバタイズしています。

トポロジー

図 1: 一般的なBGPコミュニティのトポロジー一般的なBGPコミュニティのトポロジー

デバイスR1がデバイスR4から受信した特定のルートは以下の通りです。

content_copy zoom_out_map
user@R1> show route receive-protocol bgp 10.0.0.13

inet.0: 24 destinations, 28 routes (24 active, 0 holddown, 0 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
* 172.16.0.0/24           10.0.0.13                               64511 I
* 172.16.1.0/24           10.0.0.13                               64511 I
* 172.16.2.0/24           10.0.0.13                               64511 I
* 172.16.3.0/24           10.0.0.13                               64511 I
  172.16.4.0/24           10.0.0.13                               64511 I
  172.16.5.0/24           10.0.0.13                               64511 I
  172.16.6.0/24           10.0.0.13                               64511 I
  172.16.7.0/24           10.0.0.13                               64511 I

AS 64511の管理者は、特定のユーザートラフィックをデバイスR1から、他のユーザートラフィックをR3から受信することを望んでいます。この管理目標を達成するために、デバイスR4は、送信用の一部のルートにコミュニティ値64511:1を付与し、送信用の他のルートにコミュニティ値64511:3を付与します。AS 64510内のルーティングポリシーは、コミュニティの一致基準を使用して、受信したルートのローカルプリファレンスをBGPルート選択アルゴリズムが変更する新しい値に変更します。ローカルプリファレンス値が最も高いルートが優先されます。

デバイスR1では、コミュニティ値64511:1のルートにプリファレンス値200を、64511:3のルートに50を割り当てています。デバイスR3はその逆で、コミュニティ値64511:3のルートにプリファレンス値200を、64511:1のルートに50を割り当てています。この情報は、IBGPを介してデバイスR1およびR3の両方からR2へ送信されます。

CLIクイック構成は、図 1でのすべてのデバイスの設定を示しています。

「ステップバイステップ設定手順」では、R1およびR4デバイスの設定手順を説明します。

設定

CLIクイック構成

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

デバイスR1

content_copy zoom_out_map
set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/30
set interfaces ge-0/0/1 unit 0 family inet address 10.1.0.5/30
set interfaces ge-0/0/2 unit 0 family inet address 10.0.0.14/30
set interfaces lo0 unit 0 family inet address 192.168.0.1/32
set policy-options policy-statement change-local-preference term find-R1-routes from community R1_PREFERRED
set policy-options policy-statement change-local-preference term find-R1-routes then local-preference 200
set policy-options policy-statement change-local-preference term find-R3-routes from community R3_PREFERRED
set policy-options policy-statement change-local-preference term find-R3-routes then local-preference 50
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 from route-filter 10.0.0.12/30 exact
set policy-options policy-statement send-direct term 1 then accept
set policy-options community R3_PREFERRED members 64511:3
set policy-options community R1_PREFERRED members 64511:1
set protocols bgp group int type internal
set protocols bgp group int local-address 192.168.0.1
set protocols bgp group int export send-direct
set protocols bgp group int neighbor 192.168.0.2
set protocols bgp group int neighbor 192.168.0.3
set protocols bgp group ext type external
set protocols bgp group ext import change-local-preference
set protocols bgp group ext peer-as 64511
set protocols bgp group ext neighbor 10.0.0.13
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set routing-options router-id 192.168.0.1
set routing-options autonomous-system 64510

デバイスR2

content_copy zoom_out_map
set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.2/30
set interfaces ge-0/0/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 int type internal
set protocols bgp group int local-address 192.168.0.2
set protocols bgp group int neighbor 192.168.0.1
set protocols bgp group int neighbor 192.168.0.3
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set routing-options router-id 192.168.0.2
set routing-options autonomous-system 64510

デバイスR3

content_copy zoom_out_map
set interfaces ge-0/0/0 unit 0 family inet address 10.1.0.6/30
set interfaces ge-0/0/1 unit 0 family inet address 10.1.0.2/30
set interfaces ge-0/0/2 unit 0 family inet address 10.0.0.10/30
set interfaces lo0 unit 0 family inet address 192.168.0.3/32
set policy-options policy-statement change-local-preference term find-R3-routes from community R3_PREFERRED
set policy-options policy-statement change-local-preference term find-R3-routes then local-preference 200
set policy-options policy-statement change-local-preference term find-R1-routes from community R1_PREFERRED
set policy-options policy-statement change-local-preference term find-R1-routes then local-preference 50
set policy-options policy-statement send-direct term 1 from protocol direct
set policy-options policy-statement send-direct term 1 from route-filter 10.0.0.8/30 exact
set policy-options policy-statement send-direct term 1 then accept
set policy-options community R1_PREFERRED members 64511:1
set policy-options community R3_PREFERRED members 64511:3
set protocols bgp group int type internal
set protocols bgp group int local-address 192.168.0.3
set protocols bgp group int export send-direct
set protocols bgp group int neighbor 192.168.0.1
set protocols bgp group int neighbor 192.168.0.2
set protocols bgp group ext type external
set protocols bgp group ext import change-local-preference
set protocols bgp group ext peer-as 64511
set protocols bgp group ext neighbor 10.0.0.9
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set routing-options router-id 192.168.0.3
set routing-options autonomous-system 64510

デバイス R4

content_copy zoom_out_map
set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.13/30
set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.9/30
set interfaces lo0 unit 0 family inet address 192.168.0.4/32
set policy-options policy-statement send-static term 1 from protocol static
set policy-options policy-statement send-static term 1 from route-filter 172.16.0.0/24 exact
set policy-options policy-statement send-static term 1 from route-filter 172.16.1.0/24 exact
set policy-options policy-statement send-static term 1 from route-filter 172.16.2.0/24 exact
set policy-options policy-statement send-static term 1 from route-filter 172.16.3.0/24 exact
set policy-options policy-statement send-static term 1 then community add R1_PREFERRED
set policy-options policy-statement send-static term 1 then accept
set policy-options policy-statement send-static term 2 from protocol static
set policy-options policy-statement send-static term 2 from route-filter 172.16.4.0/24 exact
set policy-options policy-statement send-static term 2 from route-filter 172.16.5.0/24 exact
set policy-options policy-statement send-static term 2 from route-filter 172.16.6.0/24 exact
set policy-options policy-statement send-static term 2 from route-filter 172.16.7.0/24 exact
set policy-options policy-statement send-static term 2 then community add R3_PREFERRED
set policy-options policy-statement send-static term 2 then accept
set policy-options policy-statement send-static term 3 then reject
set policy-options community R3_PREFERRED members 64511:3
set policy-options community R1_PREFERRED members 64511:1
set protocols bgp group to-R1 type external
set protocols bgp group to-R1 export send-static
set protocols bgp group to-R1 peer-as 64510
set protocols bgp group to-R1 neighbor 10.0.0.14
set protocols bgp group to-R3 type external
set protocols bgp group to-R3 export send-static
set protocols bgp group to-R3 peer-as 64510
set protocols bgp group to-R3 neighbor 10.0.0.10
set routing-options router-id 192.168.0.4
set routing-options autonomous-system 64511
set routing-options static route 172.16.0.0/24 reject
set routing-options static route 172.16.1.0/24 reject
set routing-options static route 172.16.2.0/24 reject
set routing-options static route 172.16.3.0/24 reject
set routing-options static route 172.16.4.0/24 reject
set routing-options static route 172.16.5.0/24 reject
set routing-options static route 172.16.6.0/24 reject
set routing-options static route 172.16.7.0/24 reject

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

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

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

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

    content_copy zoom_out_map
    [edit interfaces]
    user@R1# set ge-0/0/0 unit 0 family inet address 10.0.0.1/30
    user@R1# set ge-0/0/1 unit 0 family inet address 10.1.0.5/30
    user@R1# set ge-0/0/2 unit 0 family inet address 10.0.0.14/30
    user@R1# set lo0 unit 0 family inet address 192.168.0.1/32
    
  2. デバイスR2およびR3への内部ゲートウェイプロトコル(IGP)接続を設定します。

    content_copy zoom_out_map
    [edit protocols ospf area 0.0.0.0]
    user@R1# set interface ge-0/0/0.0
    user@R1# set interface ge-0/0/1.0
    user@R1# set interface lo0.0 passive
    
  3. デバイスR2およびR3へのIBGP接続を設定します。

    content_copy zoom_out_map
    [edit protocols bgp group int]
    user@R1# set type internal
    user@R1# set local-address 192.168.0.1
    user@R1# set export send-direct
    user@R1# set neighbor 192.168.0.2
    user@R1# set neighbor 192.168.0.3
    
  4. デバイスR4へのEBGP接続を設定します。

    content_copy zoom_out_map
    [edit protocols bgp group ext]
    user@R1# set type external
    user@R1# set import change-local-preference
    user@R1# set peer-as 64511
    user@R1# set neighbor 10.0.0.13
    
  5. send-directポリシーを設定します。

    このポリシーはIBGPの設定で参照され、デバイスR2の外部への到達性を有効にします。デバイスR1およびR3にnext-hop selfポリシーを設定する方法もあります。

    content_copy zoom_out_map
    [edit policy-options policy-statement send-direct term 1]
    user@R1# set from protocol direct
    user@R1# set from route-filter 10.0.0.12/30 exact
    user@R1# set then accept
    
  6. 指定されたコミュニティタグを持つルートのローカルプリファレンスを変更するポリシーを設定します。

    content_copy zoom_out_map
    [edit policy-options ]
    user@R1# set policy-statement change-local-preference term find-R1-routes from community R1_PREFERRED
    user@R1# set policy-statement change-local-preference term find-R1-routes then local-preference 200
    user@R1# set policy-statement change-local-preference term find-R3-routes from community R3_PREFERRED
    user@R1# set policy-statement change-local-preference term find-R3-routes then local-preference 50
    user@R1# set community R3_PREFERRED members 64511:3
    user@R1# set community R1_PREFERRED members 64511:1
    
  7. 自律システム(AS)番号とルーターIDを設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R1# set router-id 192.168.0.1
    user@R1# set autonomous-system 64510
    

デバイスR4を設定します。

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

    content_copy zoom_out_map
    [edit interfaces]
    user@R4# set ge-0/0/0 unit 0 family inet address 10.0.0.13/30
    user@R4# set ge-0/0/1 unit 0 family inet address 10.0.0.9/30
    user@R4# set lo0 unit 0 family inet address 192.168.0.4/32
    
  2. デバイスR1およびR3にEBGP接続を設定します。

    content_copy zoom_out_map
    [edit protocols bgp]
    user@R4# set group to-R1 type external
    user@R4# set group to-R1 export send-static
    user@R4# set group to-R1 peer-as 64510
    user@R4# set group to-R1 neighbor 10.0.0.14
    user@R4# set group to-R3 type external
    user@R4# set group to-R3 export send-static
    user@R4# set group to-R3 peer-as 64510
    user@R4# set group to-R3 neighbor 10.0.0.10
    
  3. コミュニティタグを設定します。

    content_copy zoom_out_map
    [edit policy-options ]
    user@R4# set community R3_PREFERRED members 64511:3
    user@R4# set community R1_PREFERRED members 64511:1
    
  4. send-staticポリシーを設定します。

    このポリシーは、デバイスR1およびR3へのEBGP接続で参照されます。このポリシーは、一部のルートに64511:1(PREFERRED)コミュニティを、他のルートに64511:3(NOT_PREFERRED)コミュニティを付与します。

    content_copy zoom_out_map
    [edit policy-options]
    user@R4# set policy-statement send-static term 1 from protocol static
    user@R4# set policy-statement send-static term 1 from route-filter 172.16.0.0/24 exact
    user@R4# set policy-statement send-static term 1 from route-filter 172.16.1.0/24 exact
    user@R4# set policy-statement send-static term 1 from route-filter 172.16.2.0/24 exact
    user@R4# set policy-statement send-static term 1 from route-filter 172.16.3.0/24 exact
    user@R4# set policy-statement send-static term 1 then community add R1_PREFERRED
    user@R4# set policy-statement send-static term 1 then accept
    user@R4# set policy-statement send-static term 2 from protocol static
    user@R4# set policy-statement send-static term 2 from route-filter 172.16.4.0/24 exact
    user@R4# set policy-statement send-static term 2 from route-filter 172.16.5.0/24 exact
    user@R4# set policy-statement send-static term 2 from route-filter 172.16.6.0/24 exact
    user@R4# set policy-statement send-static term 2 from route-filter 172.16.7.0/24 exact
    user@R4# set policy-statement send-static term 2 then community add R3_PREFERRED
    user@R4# set policy-statement send-static term 2 then accept
    user@R4# set policy-statement send-static term 3 then reject
    
  5. 静的ルートを構成します。

    content_copy zoom_out_map
    [edit routing-options static]
    user@R4# set route 172.16.0.0/24 reject
    user@R4# set route 172.16.1.0/24 reject
    user@R4# set route 172.16.2.0/24 reject
    user@R4# set route 172.16.3.0/24 reject
    user@R4# set route 172.16.4.0/24 reject
    user@R4# set route 172.16.5.0/24 reject
    user@R4# set route 172.16.6.0/24 reject
    user@R4# set route 172.16.7.0/24 reject
    
  6. 自律システム(AS)番号とルーターIDを設定します。

    content_copy zoom_out_map
    [edit routing-options]
    user@R4# set router-id 192.168.0.4
    user@R4# set autonomous-system 64511
    

結果

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

デバイスR1

content_copy zoom_out_map
user@R1# show interfaces
ge-0/0/0 {
    unit 0 {
        family inet {
            address 10.0.0.1/30;
        }
    }
}
ge-0/0/1 {
    unit 0 {
        family inet {
            address 10.1.0.5/30;
        }
    }
}
ge-0/0/2 {
    unit 0 {
        family inet {
            address 10.0.0.14/30;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 192.168.0.1/32;
        }
    }
}
content_copy zoom_out_map
user@R1# show protocols
bgp {
    group int {
        type internal;
        local-address 192.168.0.1;
        export send-direct;
        neighbor 192.168.0.2;
        neighbor 192.168.0.3;
    }
    group ext {
        type external;
        import change-local-preference;
        peer-as 64511;
        neighbor 10.0.0.13;
    }
}
ospf {
    area 0.0.0.0 {
        interface ge-0/0/0.0;
        interface ge-0/0/1.0;
        interface lo0.0 {
            passive;
        }
    }
}
content_copy zoom_out_map
user@R1# show policy-options
policy-statement change-local-preference {
    term find-R1-routes {
        from community R1_PREFERRED;
        then {
            local-preference 200;
        }
    }
    term find-R3-routes {
        from community R3_PREFERRED;
        then {
            local-preference 50;
        }
    }
}
policy-statement send-direct {
    term 1 {
        from {
            protocol direct;
            route-filter 10.0.0.12/30 exact;
        }
        then accept;
    }
}
community R3_PREFERRED members 64511:3;
community R1_PREFERRED members 64511:1;
content_copy zoom_out_map
user@R1# show routing-options
router-id 192.168.0.1;
autonomous-system 64510;

デバイス R4

content_copy zoom_out_map
user@R4# show interfaces
ge-0/0/0 {
    unit 0 {
        family inet {
            address 10.0.0.13/30;
        }
    }
}
ge-0/0/1 {
    unit 0 {
        family inet {
            address 10.0.0.9/30;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 192.168.0.4/32;
        }
    }
}
content_copy zoom_out_map
user@R4# show protocols
bgp {
    group to-R1 {
        type external;
        export send-static;
        peer-as 64510;
        neighbor 10.0.0.14;
    }
    group to-R3 {
        type external;
        export send-static;
        peer-as 64510;
        neighbor 10.0.0.10;
    }
}
content_copy zoom_out_map
user@R4# show policy-options
policy-statement send-static {
    term 1 {
        from {
            protocol static;
            route-filter 172.16.0.0/24 exact;
            route-filter 172.16.1.0/24 exact;
            route-filter 172.16.2.0/24 exact;
            route-filter 172.16.3.0/24 exact;
        }
        then {
            community add R1_PREFERRED;
            accept;
        }
    }
    term 2 {
        from {
            protocol static;
            route-filter 172.16.4.0/24 exact;
            route-filter 172.16.5.0/24 exact;
            route-filter 172.16.6.0/24 exact;
            route-filter 172.16.7.0/24 exact;
        }
        then {
            community add R3_PREFERRED;
            accept;
        }
    }
    term 3 {
        then reject;
    }
}
community R3_PREFERRED members 64511:3;
community R1_PREFERRED members 64511:1;
content_copy zoom_out_map
user@R4# show routing-options
router-id 192.168.0.4;
autonomous-system 64511;
static {
    route 172.16.0.0/24 reject;
    route 172.16.1.0/24 reject;
    route 172.16.2.0/24 reject;
    route 172.16.3.0/24 reject;
    route 172.16.4.0/24 reject;
    route 172.16.5.0/24 reject;
    route 172.16.6.0/24 reject;
    route 172.16.7.0/24 reject;
}

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

検証

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

デバイスR4で送信したルートを確認します

目的

デバイスR4でデバイスR1およびR3に送信したルートを確認します。

アクション

content_copy zoom_out_map
user@R4> show route advertising-protocol bgp 10.0.0.14 extensive

inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
* 172.16.0.0/24 (1 entry, 1 announced)
 BGP group to-R1 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:1

* 172.16.1.0/24 (1 entry, 1 announced)
 BGP group to-R1 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:1

* 172.16.2.0/24 (1 entry, 1 announced)
 BGP group to-R1 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:1

* 172.16.3.0/24 (1 entry, 1 announced)
 BGP group to-R1 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:1

* 172.16.4.0/24 (1 entry, 1 announced)
 BGP group to-R1 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:3

* 172.16.5.0/24 (1 entry, 1 announced)
 BGP group to-R1 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:3

* 172.16.6.0/24 (1 entry, 1 announced)
 BGP group to-R1 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:3

* 172.16.7.0/24 (1 entry, 1 announced)
 BGP group to-R1 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:3

content_copy zoom_out_map
user@R4> show route advertising-protocol bgp 10.0.0.10 extensive

inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
* 172.16.0.0/24 (1 entry, 1 announced)
 BGP group to-R3 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:1

* 172.16.1.0/24 (1 entry, 1 announced)
 BGP group to-R3 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:1

* 172.16.2.0/24 (1 entry, 1 announced)
 BGP group to-R3 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:1

* 172.16.3.0/24 (1 entry, 1 announced)
 BGP group to-R3 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:1

* 172.16.4.0/24 (1 entry, 1 announced)
 BGP group to-R3 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:3

* 172.16.5.0/24 (1 entry, 1 announced)
 BGP group to-R3 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:3

* 172.16.6.0/24 (1 entry, 1 announced)
 BGP group to-R3 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:3

* 172.16.7.0/24 (1 entry, 1 announced)
 BGP group to-R3 type External
     Nexthop: Self
     AS path: [64511] I
     Communities: 64511:3

意味

デバイスR4は、ルートにコミュニティ64511:1および64511:3のタグを付けて、デバイスR1およびR3に送信しています。

デバイスR2で受信したルートを確認します

目的

デバイスR2でデバイスR1およびR3から受信したルートを確認します。

アクション

content_copy zoom_out_map
user@R2> show route receive-protocol bgp 192.168.0.1

inet.0: 25 destinations, 25 routes (25 active, 0 holddown, 0 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
* 10.0.0.12/30            192.168.0.1                  100        I
* 172.16.0.0/24           10.0.0.13                    200        64511 I
* 172.16.1.0/24           10.0.0.13                    200        64511 I
* 172.16.2.0/24           10.0.0.13                    200        64511 I
* 172.16.3.0/24           10.0.0.13                    200        64511 I
content_copy zoom_out_map
user@R2> show route receive-protocol bgp 192.168.0.3

inet.0: 25 destinations, 25 routes (25 active, 0 holddown, 0 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
* 10.0.0.8/30             192.168.0.3                  100        I
* 172.16.4.0/24           10.0.0.9                     200        64511 I
* 172.16.5.0/24           10.0.0.9                     200        64511 I
* 172.16.6.0/24           10.0.0.9                     200        64511 I
* 172.16.7.0/24           10.0.0.9                     200        64511 I
content_copy zoom_out_map
user@R2> show route match-prefix 172.16.*

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

172.16.0.0/24      *[BGP/170] 1w3d 00:02:11, localpref 200, from 192.168.0.1
                      AS path: 64511 I, validation-state: unverified
                    >  to 10.0.0.1 via ge-0/0/0.0
172.16.1.0/24      *[BGP/170] 1w3d 00:02:11, localpref 200, from 192.168.0.1
                      AS path: 64511 I, validation-state: unverified
                    >  to 10.0.0.1 via ge-0/0/0.0
172.16.2.0/24      *[BGP/170] 1w3d 00:02:11, localpref 200, from 192.168.0.1
                      AS path: 64511 I, validation-state: unverified
                    >  to 10.0.0.1 via ge-0/0/0.0
172.16.3.0/24      *[BGP/170] 1w3d 00:02:11, localpref 200, from 192.168.0.1
                      AS path: 64511 I, validation-state: unverified
                    >  to 10.0.0.1 via ge-0/0/0.0
172.16.4.0/24      *[BGP/170] 1w3d 00:01:50, localpref 200, from 192.168.0.3
                      AS path: 64511 I, validation-state: unverified
                    >  to 10.1.0.2 via ge-0/0/1.0
172.16.5.0/24      *[BGP/170] 1w3d 00:01:50, localpref 200, from 192.168.0.3
                      AS path: 64511 I, validation-state: unverified
                    >  to 10.1.0.2 via ge-0/0/1.0
172.16.6.0/24      *[BGP/170] 1w3d 00:01:50, localpref 200, from 192.168.0.3
                      AS path: 64511 I, validation-state: unverified
                    >  to 10.1.0.2 via ge-0/0/1.0
172.16.7.0/24      *[BGP/170] 1w3d 00:01:50, localpref 200, from 192.168.0.3
                      AS path: 64511 I, validation-state: unverified
                    >  to 10.1.0.2 via ge-0/0/1.0

意味

デバイスR2には、アスタリスク(*)で指定する予想ローカルプリファレンスと予想アクティブルートがあります。

例:BGPコミュニティ数に基づくルーティングポリシーの設定
footer-navigation