BGP セッションの自律システム
BGPローカルAS属性を理解する
インターネットサービスプロバイダ(ISP)が別の自律システム(AS)に属するネットワークを取得する場合、取得しているISPのASに取得したネットワークのBGPピアを移動するためのシームレスな方法はありません。BGPピアを新しいAS番号で設定するプロセスは、時間がかかり面倒な場合があります。お客様は、ピアの調整や設定をすぐに変更したくない、またはすぐに変更できない場合があります。この種の移行期間中、BGPアップデートで以前のAS番号を使用するように、新しいAS内のBGP対応デバイスを設定すると便利です。この以前のAS番号は 、ローカルASと呼ばれています。
ローカルAS番号を使用すると、取得したネットワーク内のルーティングデバイスが以前のASに属しているように見えます。
たとえば、65 200のASを持つISP Aは、65250のASを持つISP Bを取得します。ISP B には、設定を変更しない顧客 ISP C があります。ISP BがISP Aの一部になった後、ISP CとのEBGPピアセッションで使用するために65250のローカルAS番号が設定されます。したがって、65 250のローカルAS番号は、ISP Cの外部ピアにルートをエクスポートするために使用されるASパスのグローバルAS番号65200の前の先頭に付加されるか、使用されます。
内部BGP(IBGP)ピアからルートを受信した場合、ASパスにはグローバルAS番号の前の先頭に付加されたローカルAS番号が含まれます。
ルートがBGPにインポートされる静的ルートや内部ゲートウェイプロトコル(IGP)ルートなどの外部ルートの場合、ローカルAS番号はグローバルAS番号の代わりに使用されます。ルートが外部で、グローバルAS番号をASパスに含める場合は、 または as-path-prepend
を使用as-path-expand
するルーティングポリシーを適用できます。ポリシーアクションを as-path-expand
使用して、グローバルAS番号をローカルAS番号の背後に配置します。ポリシーアクションを as-path-prepend
使用して、グローバルAS番号をローカルAS番号の前に配置します。
次がその例です。
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;
}
}
}
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; } }
user@R2# show routing-options static { route 10.1.1.1/32 next-hop 10.0.0.1; } autonomous-system 65200;
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
できます。
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; } } } }
ローカルAS属性のJunosオペレーティングシステム(Junos OS)実装は、以下のオプションをサポートしています。
-
Local AS with private option- このオプションを
private
使用すると、EBGPネイバーとのBGPセッション確立時にローカルASが使用されますが、他 のIBGPおよび EBGPピアに送信されたASパスには非表示になります。外部ピアに送信されるASパスには、グローバルASのみが含まれます。このオプションは
private
、以前のASで設定されたままのルーティングデバイス、またはピアの配置をまだ変更していない特定の顧客とのローカルピアリングを確立する場合に便利です。ローカルASは、EBGPネイバーとのBGPセッションを確立するために使用されますが、別のASの外部ピアに送信されたASパスには表示されません。外部ピアに
private
送信されるASパスで、ローカルASがグローバルASの前の先頭に付加されないため、 オプションを含めます。オプションを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に設定すると、ルーター3にルートをアドバタイズする際に、ルーター2がAS 64497を追加できます。ルーター3は、プレフィックス10/8の64497 64496のASパスを確認します。
図 1: ローカルAS設定ルーター2が他のピアへの通知にローカルAS番号を追加しないようにするには、 ステートメントを
local-as 64497 private
使用します。このステートメントは、ルーター1とルーター4へのルートをアナウンスする際に、ローカルAS 64497を含まないルーター2を設定します。この場合、ルーター4は、プレフィックス10.222/16の64496 64510のASパスを確認します。 -
Local AS with alias optionJunos OSリリース9.5以降では、ローカルASをエイリアスとして設定できます。BGPオープンセッションの確立中、オープンメッセージで使用されるASは、ローカルASとグローバルASが交互に入れ替わる。ローカルASがEBGPネイバーとの接続に使用される場合、BGPピアセッションが確立されたとき、ローカルASのみがASパスの先頭に付加されます。グローバルASをEBGPネイバーとの接続に使用する場合、BGPピアセッションが確立されている場合、グローバルASのみがASパスの先頭に付加されます。また、 オプションを
alias
使用すると、EBGPネイバーから学習したルートに対して、ローカルASがASパスの先頭に付加されません。そのため、ローカルASは他の外部ピアから非表示のままになります。このオプションを使用してローカルASを
alias
設定することは、取得したネットワーク内のルーティングデバイスを新しいASに移行する場合に特に便利です。移行プロセス中に、一部のルーティングデバイスは新しいASで設定されることがありますが、他のルーティングデバイスは以前のASで設定されたままになります。たとえば、まずルートリフレクタとして機能する新しいASルーティングデバイスに移行することをお勧めします。ただし、ルートリフレクタクライアントを段階的に移行する際、各ルートリフレクタは、以前のASで設定されたルーティングデバイスと、新しいASで設定されたルーティングデバイスとのピアを持つ必要があります。ローカルピアセッションを確立するには、ネットワーク内のBGPピアがローカルASとグローバルASの両方を使用すると便利です。同時に、ルートを別のASにエクスポートする際に、このローカルASを外部ピアから非表示にし、ASパスでグローバルASのみを使用します。このような場合は、 オプションを設定しますalias
。alias
階層レベルで設定されたグローバルASのエイリアスとしてローカルASを設定する オプションを[edit routing-options]
含めます。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 ASJunos OSリリース9.6以降では、グローバルASの先頭に追加しないオプションでローカルASを設定できます。外部ピアに送信されるASパスには、ローカルASのみが含まれます。
no-prepend-global-as
仮想プライベートネットワーク(VPN)シナリオで、アウトバウンドBGP更新からグローバルAS番号を取り除く場合は、 オプションを使用します。このオプションは、VPNからグローバルASを非表示にするaVPNシナリオで便利です。no-prepend-global-as
外部ピアに送信されたASパスから削除された[edit routing-options]
階層レベルで設定されたグローバル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)を設定する方法を示しています。
要件
この例を設定する前に、デバイスの初期化以外の特別な設定は必要ありません。
概要
ISPがマージして顧客の local-as
設定(特に顧客がピア関係を確立するように設定されているAS)を保持したい場合は、 ステートメントを使用します。このステートメントは local-as
、ISPのルーターが別のASに移動した場合でも、顧客ルーターにすでに配置されているAS番号をシミュレートします。
この例では、 ステートメントを使用 local-as
してローカルASを設定する方法を示しています。ステートメントは local-as
、グローバル、グループ、およびネイバーの階層レベルでBGPに対してサポートされています。
ステートメントを設定する local-as
場合、AS番号を指定する必要があります。1~4,294,967,295の数字をプレーン番号形式で指定できます。Junos OSリリース9.1以降では、AS番号の範囲が拡張され、RFC 4893、 4オクテットAS番号スペースのBGPサポートで定義されている4バイト AS番号のBGPサポートを提供します。Junos OSリリース9.3以降では、ピリオドで連結された2つの整数値のASドット表記形式を使用して、4バイトAS番号を設定することもできます。16-bit high-order value in decimal<>.<16-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~65,535です(これは4バイト範囲のサブセットです)。
図 2 は、サンプル トポロジーを示しています。

この例では、デバイスR2は以前はAS 250に属し、現在はAS 200に属しています。デバイスR1とデバイスR3は、新しいAS番号(AS 200)ではなく、AS 250とピアリングするように設定されています。デバイスR2には、 ステートメントで設定された新しいAS番号が autonomous-system 200
設定されています。ピアリングセッションを動作させるために、BGP設定に local-as 250
ステートメントが追加されます。設定されているため local-as 250
、デバイスR2はBGPインバウンドおよびアウトバウンドの更新にグローバルAS(200)とローカルAS(250)の両方を含みます。
設定
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に合わせて必要な詳細を変更し、コマンドを 階層レベルの CLI [edit]
にコピー アンド ペーストします。
デバイス R1
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
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
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エディターの使用を参照してください。
デバイスR1を設定するには:
インターフェイスを設定します。
[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
外部 BGP(EBGP)を設定します。
[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
ルーティングポリシーを設定します。
[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
デバイスR2とデバイスR3間のリモートネットワークへの静的ルートを設定します。
[edit routing-options] user@R1# set static route 10.1.0.0/30 next-hop 10.0.0.2
グローバルAS番号を設定します。
[edit routing-options] user@R1# set autonomous-system 100
結果
設定モードから、 、show protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } }
user@R1# show protocols bgp { group ext { type external; export [ send-direct send-static ]; peer-as 250; neighbor 10.0.0.2; } }
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を設定するには:
インターフェイスを設定します。
[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
EBGPを設定します。
[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
ローカル自律システム(AS)番号を設定します。
[edit protocols bgp group ext] user@R2# set local-as 250
グローバルAS番号を設定します。
[edit routing-options] user@R2# set autonomous-system 200
ルーティングポリシーを設定します。
[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 protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } }
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; } } }
user@R2# show routing-options autonomous-system 200;
デバイスの設定が完了したら、設定モードから を入力します commit
。
デバイスR3の設定
手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、 Junos OS CLIユーザーガイドの設定モードでのCLIエディターの使用を参照してください。
デバイスR3を設定するには:
インターフェイスを設定します。
[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
EBGPを設定します。
[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
グローバル自律システム(AS)番号を設定します。
[edit routing-options] user@R3# set autonomous-system 300
デバイスR1とデバイスR2間のリモートネットワークへの静的ルートを設定します。
[edit routing-options] user@R3# set static route 10.0.0.0/30 next-hop 10.1.0.1
ルーティングポリシーを設定します。
[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 protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } }
user@R3# show protocols bgp { group ext { type external; export [ send-direct send-static ]; peer-as 250; neighbor 10.1.0.1; } }
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
入力します。
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
入力します。
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
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
意味
デバイスR2が実際にAS 200にあっても、デバイスR1とデバイスR3はAS 250内のデバイスとピアリングしているように見えます。
BGP ASパスの検証
目的
ルートがルーティングテーブルにあり、ASパスにローカルAS番号250が表示されていることを確認します。
対処
設定モードから、 コマンドを set route protocol bgp
入力します。
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
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にあっても、デバイスR1とデバイスR3にはAS 250を含むASパスを持つルートがあるようです。
例:EBGPセッションのプライベートローカルASを設定する
この例では、プライベートローカル自律システム(AS)番号を設定する方法を示しています。ローカルASは、ピアリングにローカルAS番号を使用するピアにアドバタイズされますが、ピアリングにグローバルAS番号を使用できるピアへのアナウンスには非表示になっているため、プライベートと見なされます。
要件
この例を設定する前に、デバイスの初期化以外の特別な設定は必要ありません。
概要
ISPがマージして顧客の local-as
設定(特に顧客がピア関係を確立するように設定されているAS)を保持したい場合は、 ステートメントを使用します。このステートメントは local-as
、ISPのルーターが別のASに移動した場合でも、顧客ルーターにすでに配置されているAS番号をシミュレートします。
このオプションを private
使用すると、外部BGP(EBGP)ネイバーとのBGPセッション確立時にローカルASが使用されますが、他のEBGPピアに送信されるASパスには表示されません。外部ピアに送信されるASパスには、グローバルASのみが含まれます。
このオプションは private
、以前のASで設定されたままのルーティングデバイス、またはピアの配置をまだ変更していない特定の顧客とのローカルピアリングを確立する場合に便利です。ローカルASは、EBGPネイバーとのBGPセッションを確立するために使用されますが、別のAS内の外部ピアに送信されたASパスには表示されません。
外部ピアに private
送信されるASパスで、ローカルASがグローバルASの前の先頭に付加されないため、 オプションを含めます。オプションを private
指定すると、EBGPネイバーに送信されたASパスの先頭にのみローカルASが付加されます。
図 3 は、サンプル トポロジーを示しています。

デバイス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で設定する必要があります。ローカルASを64497に設定すると、デバイス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パスを確認します。private
デバイスR1の設定の オプションにより、デバイスR1がデバイスR2に変換するASパスからAS番号64497が失われます。
デバイスR1は、デバイスR3を除くすべてのルーターからプライベートローカルASを非表示にします。このオプションは private
、デバイスR1がデバイスR3から受信(学習)するルートと、デバイスR1が次に他のルーターにアドバタイズするルートに適用されます。デバイスR3から学習したこれらのルートがデバイスR1からデバイスR2にアドバタイズされると、デバイスR2にアドバタイズされたASパスからプライベートローカルASがありません。
設定
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に合わせて必要な詳細を変更し、コマンドを 階層レベルの CLI [edit]
にコピー アンド ペーストします。
デバイス R1
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
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
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
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エディターの使用を参照してください。
デバイスR1を設定するには:
インターフェイスを設定します。
[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
デバイスR2とのEBGPピアリングセッションを設定します。
[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
デバイスR3とのEBGPピアリングセッションを設定します。
[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
ルーティングポリシーを設定します。
[edit policy-options policy-statement send-direct term 1] user@R1# set from protocol direct user@R1# set then accept
グローバル自律システム(AS)番号を設定します。
[edit routing-options] user@R1# set autonomous-system 64496
結果
設定モードから、 、show protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
user@R1# show policy-options policy-statement send-direct { term 1 { from protocol direct; then accept; } }
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; } }
user@R1# show routing-options autonomous-system 64496;
デバイスの設定が完了したら、設定モードから を入力します commit
。
トポロジー内の他のデバイスに必要に応じて設定を繰り返します。
検証
設定が正しく機能していることを確認します。
デバイスR2のASパスの確認
目的
デバイスR2がデバイスR3およびデバイスR4へのASパスにAS 64497を持たないことを確認します。
対処
動作モードから、 コマンドを show route protocol bgp
入力します。
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
入力します。
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)メトリック属性により、単一の管理で複数の連続したBGPASを実行できる導入が可能になります。このような導入により、BGPはIGPメトリックに基づいてルーティングを決定できます。このようなネットワークでは、BGPがIGPによって行われるようにメトリックに基づいてパスを選択することができます。この場合、ノードが 2 つの異なる AS にある場合でも、BGP は 2 つのノード間の最短パスを選択します。
AIGP属性は、トンネリングを使用してBGPネクストホップにパケットを配信するネットワークで特に有用です。ジュニパーネットワークス® Junos®オペレーティングシステム(Junos OS)は、現在、2つのBGPアドレスファミリー、 および family inet6 labeled-unicast
に対するAIGP属性をサポートしていますfamily inet labeled-unicast
。
AIGPはBGPの最適ルート決定プロセスに影響を与えます。AIGP属性プリファレンスルールは、ローカルプリファレンスルールの後に適用されます。AIGP距離は、同数を破るために比較されます。また、BGPの最適ルート決定プロセスは、解決するネクストホップにAIGP属性がある場合、内部コストルールの適用方法にも影響を与えます。AIGPが有効になっていない場合、ルートの内部コストは、ルートのネクストホップへのメトリックの計算に基づいています。AIGPを有効にすると、AIGP距離の解決が内部コストに追加されます。
リリース20.2R1以降、Junos OSはAIGPメトリックのMEDへの変換をサポートしています。この機能は、MEDが最適なパスの選択に使用されるエンドツーエンドのAIGPメトリック値を伝送したい場合に有効にすることができます。 これは、顧客サイトが2つの異なるサービスプロバイダを介して接続され、カスタマーエッジルーターがIGPメトリックベースの決定を取りたい場合、AS間MPLS VPNソリューションで特に便利です。を minimum-aigp
設定することで、効果的なaigpが以前に知られた最も低い値を超えて変更された場合に、ルートの不必要な更新を防ぐことができます。効果的なAIGPとは、ルートでアドバタイズされるAIGP値と、ネクストホップに到達するためのIGPコストです。および 階層レベルで および minimum-effective-aigp
ステートメントを[edit protocols bgp group <group-name> metric-out]
[edit policy-options policy-statement <name> then metric]
設定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メトリックに基づいてパスを選択できます。これにより、ノードが異なるQSにある場合でも、BGPは2つのノード間の最短パスを選択できます。AIGP属性は、トンネリングを使用してBGPネクストホップにパケットを配信するネットワークで特に有用です。この例では、MPLSラベルスイッチパスで設定されたAIGPを示しています。
AIGPを有効にするには、プロトコルファミリーベースでBGP設定に ステートメントを含 aigp
めます。特定のファミリーにAIGPを設定することで、そのファミリーに対するAIGP属性の送受信が可能になります。デフォルトでは、AIGPは無効になっています。AIGP無効ネイバーはAIGP属性を送信せず、受信したAIGP属性を通知なく破棄します。
Junos OS は、 および の AIGP を family inet labeled-unicast
サポートしています family inet6 labeled-unicast
。ステートメントは aigp
、グローバルBGP、グループ、またはネイバーレベルで特定のファミリーに対して設定できます。
デフォルトでは、ローカルプレフィックスのAIGP属性の値はゼロです。AIGP対応ネイバーは、ポリシーアクションを使用して、エクスポートポリシーによって、特定のプレフィックスに対してAIGP属性を aigp-originate
発信できます。AIGP属性の値は、プレフィックスへのIGP距離を反映しています。または、ポリシーアクションを使用して値を aigp-originate distance distance
指定することもできます。設定可能な範囲は、0~4,294,967,295です。AIGP属性を発信する必要があるノードは1つだけです。ネイバーがBGP設定の ステートメントで aigp
AIGPが有効になっている場合、AIGP属性は保持され、アドバタイズされます。
AIGP属性を発信するポリシーアクションには、以下の要件があります。
ネイバーはAIGPを有効にする必要があります。
ポリシーは、エクスポート ポリシーとして適用する必要があります。
プレフィックスは、現在のAIGP属性を持つ必要はありません。
プレフィックスは、ネクストホップ self を使用してエクスポートする必要があります。
プレフィックスは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に使用され、BGPネクストホップには10.100.1.xが使用されます。
デバイスPE1とPE3の間のネットワークには、IBGPピアリングと複数のOSPFエリアがあります。デバイスPE7への外部リンクは、そのネイバーがAIGPを有効にしている場合、管理ドメイン外のネイバーにAIGP属性がアドバタイズされることを示すために設定されています。

AIGP属性の作成には、BGPネクストホップがそれ自体である必要があります。BGPネクストホップが変更されない場合、受信したAIGP属性は、同様に別のAIGPネイバーに対して、アドバタイズされます。ネクストホップが変更された場合、受信したAIGP属性は、別のAIGPネイバーに増加した値で変換されます。値の増加は、前の BGP ネクストホップへの IGP 距離を反映しています。この例では、デバイスPE2およびデバイスPE3とのデバイスPE4のEBGPピアリングセッションにループバックインターフェイスアドレスを使用しています。これらのセッションではマルチホップが有効になっているため、再帰的ルックアップを実行してポイントツーポイント インターフェイスを決定します。ネクストホップが変化するため、IGP距離がAIGP距離に追加されます。
設定
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に合わせて必要な詳細を変更し、コマンドを 階層レベルの CLI [edit]
にコピー アンド ペーストします。
デバイスP1
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
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
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
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
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
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
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を設定するには:
インターフェイスを設定します。
[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
MPLSとRSVPやLDPなどのシグナリングプロトコルを設定します。
[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
BGPを設定します。
[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
AIGPを有効にします。
[edit protocols bgp group internal] user@P1# set family inet labeled-unicast aigp
OSPF、RIP、IS-IS などの IGP を設定します。
[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
ルーターIDと自律システム番号を設定します。
[edit routing-options] user@P1# set router-id 10.9.9.2 user@P1# set autonomous-system 13979
デバイスの設定が完了したら、設定をコミットします。
user@P1# commit
結果
設定モードから、 、 、 show protocols
コマンドを入力して設定をshow interfaces
show routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } } }
user@P1# show routing-options router-id 10.9.9.2; autonomous-system 13979;
デバイスP2の設定
手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、 Junos OS CLIユーザーガイドの設定モードでのCLIエディターの使用を参照してください。
デバイスP2を設定するには:
インターフェイスを設定します。
[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
MPLSとRSVPやLDPなどのシグナリングプロトコルを設定します。
[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
BGPを設定します。
[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
AIGPを有効にします。
[edit protocols bgp group internal] user@P2# set family inet labeled-unicast aigp
OSPF、RIP、IS-IS などの IGP を設定します。
[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
ルーターIDと自律システム番号を設定します。
[edit routing-options] user@P2# set router-id 10.9.9.3 user@P2# set autonomous-system 13979
デバイスの設定が完了したら、設定をコミットします。
user@P2# commit
結果
設定モードから、 、 、 show protocols
コマンドを入力して設定をshow interfaces
show routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } } }
user@P2# show routing-options router-id 10.9.9.3; autonomous-system 13979;
デバイスPE4の設定
手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、 Junos OS CLIユーザーガイドの設定モードでのCLIエディターの使用を参照してください。
デバイスPE4を設定するには:
インターフェイスを設定します。
[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
MPLSとRSVPやLDPなどのシグナリングプロトコルを設定します。
[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
BGPを設定します。
[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
AIGPを有効にします。
[edit protocols bgp] user@PE4# set group external family inet labeled-unicast aigp user@PE4# set group internal family inet labeled-unicast aigp
プレフィックスを発信し、AIGP距離を設定します。
デフォルトでは、プレフィックスは現在のIGP距離を使用して発信されます。オプションとして、ここに示すように、 オプションを使用して、AIGP属性の距離を
distance
設定することができます。[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
ポリシーを有効にします。
[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
静的ルートを設定します。
[edit routing-options] user@PE4# set static route 44.0.0.0/24 discard
OSPF、RIP、IS-IS などの IGP を設定します。
[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
ルーターIDと自律システム番号を設定します。
[edit routing-options] user@PE4# set router-id 10.9.9.4 user@PE4# set autonomous-system 13979
デバイスの設定が完了したら、設定をコミットします。
user@PE4# commit
結果
設定モードから、 、show protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } } }
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; } } }
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を設定するには:
インターフェイスを設定します。
[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
MPLSとRSVPやLDPなどのシグナリングプロトコルを設定します。
[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
BGPを設定します。
[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
AIGPを有効にします。
[edit protocols bgp] user@PE1# set group internal family inet labeled-unicast aigp user@PE1# set group external family inet labeled-unicast aigp
ポリシーを有効にします。
[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
OSPF、RIP、IS-IS などの IGP を設定します。
[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
ルーターIDと自律システム番号を設定します。
[edit routing-options] user@PE1# set router-id 10.9.9.1 user@PE1# set autonomous-system 13979
デバイスの設定が完了したら、設定をコミットします。
user@PE1# commit
結果
設定モードから、 、show protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
user@PE1# show policy-options policy-statement SET_EXPORT_ROUTES { term 10 { from protocol [ direct bgp ]; then { next-hop 10.100.1.1; accept; } } }
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; } } }
user@PE1# show routing-options router-id 10.9.9.1; autonomous-system 13979;
デバイスPE2の設定
手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、 Junos OS CLIユーザーガイドの設定モードでのCLIエディターの使用を参照してください。
デバイスPE2を設定するには:
インターフェイスを設定します。
[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
MPLSとRSVPやLDPなどのシグナリングプロトコルを設定します。
[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
BGPを設定します。
[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
AIGPを有効にします。
[edit protocols bgp] user@PE2# set group external family inet labeled-unicast aigp
プレフィックスを発信し、AIGP距離を設定します。
デフォルトでは、プレフィックスは現在のIGP距離を使用して発信されます。オプションとして、ここに示すように、 オプションを使用して、AIGP属性の距離を
distance
設定することができます。[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
ポリシーを有効にします。
[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
いくつかのスタティックルートを有効にします。
[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
OSPF、RIP、IS-IS などの IGP を設定します。
[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
ルーターIDと自律システム番号を設定します。
[edit routing-options] user@PE2# set router-id 10.9.9.5 user@PE2# set autonomous-system 7018
デバイスの設定が完了したら、設定をコミットします。
user@PE2# commit
結果
設定モードから、 、show protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } } }
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; } } }
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を設定するには:
インターフェイスを設定します。
[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
MPLSとRSVPやLDPなどのシグナリングプロトコルを設定します。
[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
BGPを設定します。
[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
AIGPを有効にします。
[edit protocols bgp group external] user@PE3# set family inet labeled-unicast aigp
ポリシーを有効にします。
[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
OSPF、RIP、IS-IS などの IGP を設定します。
[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
ルーターIDと自律システム番号を設定します。
[edit routing-options] user@PE3# set router-id 10.9.9.6 user@PE3# set autonomous-system 7018
デバイスの設定が完了したら、設定をコミットします。
user@PE3# commit
結果
設定モードから、 、show protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } } }
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; } } }
user@PE3# show routing-options router-id 10.9.9.6; autonomous-system 7018;
デバイスPE7の設定
手順
次の例では、設定階層内のさまざまなレベルに移動する必要があります。CLIのナビゲーションについては、 Junos OS CLIユーザーガイドの設定モードでのCLIエディターの使用を参照してください。
デバイスPE7を設定するには:
インターフェイスを設定します。
[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
BGPを設定します。
[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
AIGPを有効にします。
[edit protocols bgp group external] user@PE7# set family inet labeled-unicast aigp
ルーティングポリシーを設定します。
[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
ルーターIDと自律システム番号を設定します。
[edit routing-options] user@PE7# set router-id 10.9.9.7 user@PE7# set autonomous-system 7019
デバイスの設定が完了したら、設定をコミットします。
user@PE7# commit
結果
設定モードから、 、show protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } } }
user@PE7# show policy-options policy-statement SET_EXPORT_ROUTES { term 10 { from protocol [ direct bgp ]; then { next-hop 10.100.1.7; accept; } } }
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; } }
user@PE7# show routing-options router-id 10.9.9.7; autonomous-system 7019;
検証
設定が正しく機能していることを確認します。
- デバイスPE4がEBGPネイバーPE2からAIGP属性を受信していることを確認する
- IGPメトリックの確認
- デバイスPE4がIGPメトリックをAIGP属性に追加していることを確認する
- デバイスPE7がEBGPネイバーPE1からAIGP属性を受信していることを確認する
- AIGPメトリックの解決の検証
- BGPアップデートにおけるAIGP属性の存在の検証
デバイスPE4がEBGPネイバーPE2からAIGP属性を受信していることを確認する
目的
デバイスPE2のAIGPポリシーが機能していることを確認します。
対処
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メトリックを確認します。
対処
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がIGPメトリックをAIGP属性に追加していることを確認する
目的
デバイスPE4は、IBGPネイバーであるデバイスPE1にルートをアドバタイズする際に、IGPメトリックをAIGP属性に追加することを確認してください。
対処
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ポリシーが機能していることを確認します。
対処
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値の合計があることを確認します。
対処
66.0.0.0/24 に静的ルートを追加します。
[edit routing-options] user@PE2# set static route 66.0.0.0/24 discard
デバイスPE2のポリシーステートメントで
aigp
既存の条件を削除します。[edit policy-options policy-statement aigp] user@PE2# delete term 10 user@PE2# delete term 20
66.0.0.0へのルートの再帰的ルート検索を設定します。
このポリシーは、プレフィックス66.0.0.0/24(なし)とその再帰的なネクストホップのAIGPメトリックを示しています。プレフィックス 66.0.0.0/24 は 55.0.0.1 で解決されます。プレフィックス66.0.0.0/24は、独自のAIGPメトリックが発信されていませんが、再帰的なネクストホップ55.0.0.1にはAIGP値があります。
[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
デバイスPE4で、 コマンドを
show route 55.0.0.0 extensive
実行します。Metric2の値は、BGPネクストホップへのIGPメトリックです。デバイスPE4がこれらのルートをIBGPピアであるデバイスPE1にアドバタイズすると、AIGPメトリックはAIGP + その解決AIGPメトリック + Metric2の合計です。
プレフィックス55.0.0.0は、デバイスPE2で定義およびアドバタイズされた独自のIGPメトリック20を示しています。再帰的なBGPネクストホップがないため、AIGP値の解決は表示されません。Metric2 の値は 2 です。
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
デバイス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
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属性の存在の検証
目的
BGP(またはgroup
neighbor
階層)の下でAIGP属性が有効になっていない場合、AIGP属性は通知なく破棄されます。送信または受信したBGPアップデートにdetailAIGP属性が存在することを確認するために、設定の オプションに フラグを有効traceoptionsにして含packetsめます。これは、AIGPの問題をデバッグする際に便利です。
対処
のデバイス PE2 およびデバイス PE4 を設定します traceoptions。
user@host> show protocols bgp traceoptions { file bgp size 1m files 5; flag packets detail; }
デバイスPE2で traceoptions ファイルを確認します。
以下のサンプルは、AIGPメトリックが20のデバイスPE2アドバタイズプレフィックス99.0.0.0/24をデバイスPE4(10.9.9.4)に示しています。
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)
コマンドを使用して、デバイスPE4でルートが show route receive-protocol 受信されたことを確認します。
デバイスPE4ではAIGPが有効になっていないため、プレフィックス99.0.0.0/24ではAIGP属性が通知なく破棄され、以下の出力には表示されません。
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
デバイスPE4で traceoptions ファイルを確認します。
ログからの以下の traceoptions 出力は、AIGP属性がアタッチされた 99.0.0.0/24 プレフィックスを受信したことを示しています。
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を使用できます。
ASオーバーライド機能は、BGPがデフォルトでローカルAS番号を含むASパス属性を持つBGPルートを受け入れないため、サービスプロバイダーに明確な管理上の利点をもたらします。
複数のサイトを持つエンタープライズネットワークでは、サイト間で単一のAS番号を使用することができます。たとえば、2台のCEデバイスがAS 64512に存在し、プロバイダネットワークがAS 65534にあるとします。
サービス プロバイダがこの設定でレイヤー 3 VPN を設定する場合、MPLS ネットワークにデバイス CE1 とデバイス CE2 へのルートがある場合でも、AS パス属性が 64512 65534 64512 として表示されるため、デバイス CE1 とデバイス CE2 は相互にルートを持っていません。BGPは、そのループ回避メカニズムとしてASパス属性を使用します。サイトがそれ自身のAS番号をASパスで複数回確認した場合、ルートは無効と見なされます。
この困難を克服する 1 つの方法は、PE デバイスに as-override
適用される ステートメントです。ステートメントは as-override
、CEデバイスのAS番号をPEデバイスの番号に置き換え、カスタマー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)デバイス、および複数のプロバイダーコアデバイスがあります。プロバイダネットワークは、デバイスP2がルートリフレクタ(RR)として動作しているLDPとBGPループバック到達可能性をサポートするためにIS-ISを使用しています。両方のCEデバイスは自律システム(AS)64512にあります。プロバイダネットワークはAS 65534にあります。
ステートメントは as-override
PEデバイスに適用されるため、CEデバイスのAS番号をPEデバイスのAS番号に置き換えます。これにより、カスタマーAS番号がASパス属性に複数回表示されるのを防ぎます。
図 5 は、この例で使用されているトポロジーを示しています。

CLI クイックコンフィギュレーション は、 内のすべてのデバイス 図 5の設定を示しています。セクション 手順 では、デバイス PE1 の手順について説明します。
トポロジ
設定
手順
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に合わせて必要な詳細を変更し、コマンドを 階層レベルの CLI [edit]
にコピー アンド ペーストします。
デバイスCE1
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
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
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
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
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
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
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オーバーライドを設定するには:
-
インターフェイスを設定します。
MPLSを有効にするには、インターフェイスが受信MPLSトラフィックを破棄しないように、インターフェイスにプロトコルファミリーを含めます。
[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
-
MPLS プロトコルにインターフェイスを追加して、コントロール プレーン レベルの接続を確立します。
プロバイダデバイスが相互に通信できるようにIGPを設定します。
MPLS ラベルを配布するメカニズムを確立するには、LDP を有効にします。オプションとして、LDP の場合、FEC(Forwarding Equivalence Class)のデアグリゲーションを有効にすることで、グローバルコンバージェンスを高速化できます。
[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
-
IPv4 VPNユニキャストアドレスファミリーを使用して、内部BGP(IBGP)接続をRRとのみピアリングできるようにします。
[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
-
ステートメントを含めて、ルーティングインスタンスを
as-override
設定します。PE デバイスで VRF(routing-Instance)を作成し、デバイス CE1 とピアリングするように BGP 設定を設定します。
[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
-
ルーターIDとAS番号を設定します。
[edit routing-options] user@PE1# set router-id 10.255.2.2 user@PE1# set autonomous-system 65534
結果
設定モードから、 、show routing-instances
show protocols
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力に意図した設定が表示されない場合は、この例の設定手順を繰り返して修正します。
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;
}
}
}
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;
}
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;
}
}
}
}
}
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
入力します。
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
入力します。
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
入力します。
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スプリットホライズンを実行しないためです。一般に、発信元が受信する可能性のあるルートは、ASパス長(EBGPの場合)、ASパスループ検出(IBGP)、またはその他のBGPメトリックにより優先されないため、BGPのスプリットホライズンは不要です。学習したネイバーに戻るルートをアドバタイズすることは、ルーターのパフォーマンスに無視できる影響を与えます。これは正しいことです。
例:BGPルートアドバタイズメントの有効化
Junos OSは、あるEBGPピアから学習したルートを同じ外部BGP(EBGP)ピアに戻してアドバタイズすることはありません。さらに、ソフトウェアは、ルーティングインスタンスに関係なく、送信元ピアと同じ自律システム(AS)内にあるEBGPピアにルートをアドバタイズし直しません。設定に ステートメントを含めることで、 advertise-peer-as
この動作を変更できます。
設定に ステートメントを advertise-peer-as
含める場合、BGPはこのチェックに関係なくルートをアドバタイズします。
デフォルトの動作に戻すには、設定に ステートメント no-advertise-peer-as
を含めます。
no-advertise-peer-as;
ステート メントが設定に as-override
含まれている場合、ルート抑制のデフォルト動作は無効になります。設定に と no-advertise-peer-as
の両方の as-override
ステートメントを含める場合、 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にはが設定されているため、デバイスR2は advertise peer-as
192.168.0.1ルートをデバイスR3に送信できます。同様に、デバイスR3は192.168.0.3ルートをデバイスR2に送信し advertise peer-as
、デバイスR2がデバイスR1にルートを転送できるようにします。
デバイスR1とデバイスR3が、ASパスに独自のAS番号を含むルートを受け入れるには、 loops 2
デバイスR1とデバイスR3にステートメントが必要です。
トポロジ

設定
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に合わせて必要な詳細を変更し、コマンドを 階層レベルの CLI [edit]
にコピー アンド ペーストします。
デバイス R1
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
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
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エディターの使用を参照してください。
デバイスR1を設定するには:
-
デバイス インターフェイスを設定します。
[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
-
BGPを設定します。
[edit protocols bgp group ext] user@R1# set type external user@R1# set peer-as 64511 user@R1# set neighbor 10.0.0.2
-
ステートメントを含
loops 2
めることで、デバイスR3からのルートがデバイスR1で非表示にならないようにします。ステートメントは
loops 2
、ルートを非表示にすることなく、ローカルデバイス自身のAS番号を1回までASパスに表示できることを意味します。ローカルデバイスのAS番号がパスで2回以上検知された場合、ルートは非表示になります。[edit protocols bgp family inet unicast] user@R1# set loops 2
-
直接ルートを送信するルーティングポリシーを設定します。
[edit policy-options policy-statement send-direct term 1] user@R1# set from protocol direct user@R1# set then accept
-
エクスポートポリシーを、デバイスR2とのBGPピアリングセッションに適用します。
[edit protocols bgp group ext] user@R1# set export send-direct
-
自律システム(AS)番号を設定します。
[edit routing-options ] user@R1# set autonomous-system 64512
手順
デバイスR2を設定するには:
-
デバイス インターフェイスを設定します。
[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
-
BGPを設定します。
[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
-
デバイスR2を設定して、同じAS内の1つのEBGPピアから別のEBGPピアに学習したルートをアドバタイズします。
言い換えると、デバイスR1とデバイスR3が同じASにあっても、デバイスR3から学習したデバイスR1ルート(およびその逆)にアドバタイズします。
[edit protocols bgp group ext] user@R2# set advertise-peer-as
-
直接ルートを送信するルーティングポリシーを設定します。
[edit policy-options policy-statement send-direct term 1] user@R2# set from protocol direct user@R2# set then accept
-
エクスポート・ポリシーを適用します。
[edit protocols bgp group ext] user@R2# set export send-direct
-
AS番号を設定します。
[edit routing-options] user@R2# set autonomous-system 64511
結果
設定モードから、 、show policy-options
show protocols
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
デバイス R1
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; } } }
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; } }
user@R1# show policy-options policy-statement send-direct { term 1 { from protocol direct; then accept; } }
user@R1# show routing-options autonomous-system 64512;
デバイスR2
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; } } }
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; } } }
user@R2# show policy-options policy-statement send-direct { term 1 { from protocol direct; then accept; } }
user@R2# show routing-options autonomous-system 64511;
デバイスの設定が完了したら、設定モードから を入力します commit
。
検証
設定が正しく機能していることを確認します。
BGP ルートの検証
目的
デバイスR1とデバイスR3のルーティングテーブルに期待されるルートが含まれていることを確認します。
対処
-
デバイスR2で、BGP設定の
advertise-peer-as
ステートメントを無効にします。[edit protocols bgp group ext] user@R2# deactivate advertise-peer-as user@R2# commit
-
デバイスR3で、BGP設定の
loops
ステートメントを無効にします。[edit protocols bgp family inet unicast ] user@R3# deactivate unicast loops user@R3# commit
-
デバイスR1で、デバイスR2にアドバタイズされているルートを確認します。
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
-
デバイスR2で、デバイスR1から受信したルートを確認します。
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
-
デバイスR2で、デバイスR3にアドバタイズされているルートを確認します。
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
-
デバイスR2で、BGP設定で ステートメントを有効にします
advertise-peer-as
。[edit protocols bgp group ext] user@R2# activate advertise-peer-as user@R2# commit
-
デバイスR2で、デバイスR3にアドバタイズされたルートを再確認します。
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
-
デバイスR3で、デバイスR2から受信したルートを確認します。
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
-
デバイスR3で、BGP設定で ステートメントを有効にします
loops
。[edit protocols bgp family inet unicast ] user@R3# activate unicast loops user@R3# commit
-
デバイスR3で、デバイスR2から受信したルートを再確認します。
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)ドメインを使用します。デフォルトでは、すべてのルーティング インスタンスは 1 つのプライマリ ルーティング インスタンス ドメインに属します。そのため、BGPループ検出は、すべてのルーティングインスタンスに設定されたローカルASを使用します。ネットワーク設定によっては、このデフォルトの動作により、ルートがループして非表示になる可能性があります。
プライマリルーティングインスタンスのローカルASを制限するには、ルーティングインスタンスに独立したASドメインを設定します。独立ドメインは、プライマリルーティングインスタンスから独立しており、独立したドメインのASパスを、他のドメインのASパス属性と共有しないように維持します。
デフォルトでは、独立ドメインは、遷移パス属性128(属性セット)メッセージを使用して、内部BGP(IBGP)コアを介して独立ドメインのBGP属性をトンネリングします。ただし、独立ドメインの属性セット メッセージの動作は、多くの場合、望ましくないです。ルーティングインスタンス内のローカルASの独立性を維持するために独立したドメインのみを設定し、ルーティングインスタンス内の指定されたローカルASに対してのみBGPループ検出を実行する場合は、属性セットメッセージを無効にすることができます。
独立したドメインで属性セット メッセージを無効にするには、 ステートメントを independent-domain no-attrset
含めます。
独立したドメインにルーティングインスタンスを指定すると、ローカル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は、デバイスR1とデバイスR3からデバイスR4(10.4.4.4/32)上のループバックインターフェイスアドレスについて学習しています。デバイスR1は、ASパスが65001 65005 65004で10.4.4.4/32をアドバタイズしており、デバイスR3は65003 65004のASパスで10.4.4.4/32をアドバタイズしています。デバイスR2は、ASパスがデバイスR1からのASパスよりも短いため、デバイスR3から10.4.4.4/32のパスを最適なパスとして選択します。
この例では、デバイスR2のBGP設定を変更して、ASパス長が最良のパス選択で使用しないようにします。
デバイスR1のルーターID(10.1.1.1)は、デバイスR3(10.3.3.3.3)よりも低いです。その他のすべてのパス選択基準が等しい場合(または、この場合は無視)、デバイスR1から学習したルートが使用されます。ASパス属性が無視されているため、ルーターID値が低いため、デバイスR1へのパスが最適です。
図 7 は、サンプル トポロジーを示しています。

設定
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に合わせて必要な詳細を変更し、コマンドを 階層レベルの CLI [edit]
にコピー アンド ペーストします。
デバイス R1
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
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
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
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
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を設定するには:
インターフェイスを設定します。
[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
EBGPを設定します。
[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
Junos OSのパス選択アルゴリズムで、自律システム(AS)パス属性を無視するように設定します。
[edit protocols bgp] user@R2# set path-selection as-path-ignore
ルーティングポリシーを設定します。
[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
いくつかの静的ルートを設定します。
[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
自律システム(AS)番号とルーターIDを設定します。
[edit routing-options] user@R2# set router-id 10.2.2.2 user@R2# set autonomous-system 65002
結果
設定モードから、 、show protocols
show policy-options
および のコマンドをshow interfaces
入力して設定をshow routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } }
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; } } }
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
入力します。
user@R2> restart routing Routing protocols process started, pid 49396
動作モードから、 コマンドを show route 10.4.4.4 protocol bgp
入力します。
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ピアにプレフィックスを送信する必要がある場合は、 ステートメントの代わりに ステートメントの as-override
使用を remove-private
検討してください。
この操作は、該当する場合、コンフェデレーションメンバー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 は、サンプル トポロジーを示しています。

この例では、デバイスR1はプライベートAS番号 65530を使用してサービスプロバイダに接続されています。この例では、デバイスR1の remove-private
プライベートAS番号がデバイスR2にアナウンスされないようにするために、デバイスISPに設定されたステートメントを示しています。デバイスR2は、サービスプロバイダのAS番号のみを確認します。
BGP オプション remove-private
を追加または削除すると、影響を受ける BGP ピアリング セッションがフラップすることになります。
設定
CLI クイックコンフィギュレーション
この例を迅速に設定するには、以下のコマンドをコピーしてテキスト ファイルに貼り付け、改行を削除し、ネットワーク設定に合わせて必要な詳細を変更し、コマンドを 階層レベルの CLI [edit]
にコピー アンド ペーストします。
デバイス R1
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
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
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を設定するには:
-
インターフェイスを設定します。
[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
-
EBGPを設定します。
[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
-
自律システム(AS)200(デバイスR2)内のネイバーについては、アドバタイズされたASパスからプライベートAS番号を削除します。
[edit protocols bgp group ext] user@ISP# set neighbor 192.168.20.1 remove-private
-
AS番号を設定します。
[edit routing-options] user@ISP# set autonomous-system 100
結果
設定モードから、 、 、 show protocols
コマンドを入力して設定をshow interfaces
show routing-options
確認します。出力結果に意図した設定が表示されない場合は、この例の手順を繰り返して設定を修正します。
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; } } }
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; } } }
user@ISP# show routing-options autonomous-system 100;
デバイスの設定が完了したら、設定モードから を入力します commit 。デバイスR1とデバイスR2の設定を繰り返し、必要に応じてインターフェイス名とIPアドレスを変更し、ルーティングポリシー設定を追加します。
検証
設定が正しく機能していることを確認します。
ネイバーステータスの確認
目的
デバイスISPがデバイスR2との remove-private ネイバーセッションで有効になっている設定であることを確認します。
対処
動作モードから、 コマンドを show bgp neighbor 192.168.20.1
入力します。
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
入力します。
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
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
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のルーティングテーブルを再チェックします。
[protocols bgp group ext neighbor 192.168.20.1] user@ISP# deactivate remove-private user@ISP# commit
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パスに表示されます。