アプリケーションノート
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
サービスプロバイダにおける基本的なルーティングポリシー
ピーター・ルンドクヴィスト
プロフェッショナルサービス
ピート・モイヤー
プロフェッショナルサービス
アネット・ケイ・ドネル
マーケティングエンジニア
Juniper Networks, Inc.
1194 North Mathilda Avenue
Sunnyvale, CA 94089 USA
408 745 2000 or 888 JUNIPER
www.juniper.net
Part Number : 350005-001J 11/01
ジュニパーネットワークス株式会社
〒163-1035 東京都新宿区西新宿3-7-1
新宿パークタワー N棟 35階
電話
03-5321-2600
FAX
03-5321-2700
URL
http://www.juniper.co.jp
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
目次
はじめに . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ジュニパー製ルーターの概要 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
テストセットアップ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
EGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
EBGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
IBGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
IGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
ルーティングポリシー . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
IGPがBGPネクストホップルートを搬送 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
ネクストホップを解決するためのLevel 2からLevel 1ルーターへのIS-ISルートのリーク . . . . . . . . . . . 13
IOSの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
JUNOSの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
隣接関係の例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
JuniperルーターのIS-ISデータベースの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
ルートテーブルの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
CiscoアクセスルーターのIS-IS Level 1コンフィグレーションの例 . . . . . . . . . . . . . . . . . . . . . . . 18
アクセスルーターIS-IS Level 1隣接関係の例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
アクセスルーターIS-ISデータベースの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
アクセスルーターのルートテーブル . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
アクセスルーターBGPテーブルの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
アグリゲーション . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Cisco IOSプリフィックスアグリケーションの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
JUNOSプリフィックスアグリケーションの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
境界ルーター . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
入力/出力ルーティングBGPポリシー . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Communityが合致したら、as-pathを付加し、MEDをセットする . . . . . . . . . . . . . . . . . . . . . . . . 33
Pagentの出力例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
as-pathを使ったlocal-preferenceの操作 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Martianプリフィックスフィルタ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
JUNOSポリシーの実装 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
ポリシーの評価順序 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
1つのポリシー内のポリシー . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
シーケンス内に多数のtermを持つポリシー . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
BGPの安定性に関連する機能 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
ダンピング . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
IOSダンピングコンフィグレーションの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
JUNOSダンピングコンフィグレーションの例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
受信する最大プリフィックスの保護 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
IOSの最大受信プリフィックスのコンフィグレーション例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
JUNOSの最大受信プリフィックスのコンフィグレーション例 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
2
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
JUNOSソフトウェアとIOSの相違点 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
IGPロードシェアリング . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
IGPとEGPの両方でのルートのアドバタイズ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
BGPタイマー . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
EBGPパス選択 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
ルーターのサービスアクセス制限 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
IOSのアクセス制限のコンフィグレーション . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
JUNOSのアクセス制限のコンフィグレーション . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
付録 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
JUNOS Lena境界ルーター . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84
JUNOS Lunkanコアルートリフレクタと192.168.1/24ネットワークのアクセスルーター . . . . . . . .89
JUNOS Ida配信/POPルートリフレクタとIS-IS Level 2-Level 1間のリークルーター . . . . . . . . . . . . 92
IOS Cisco_border境界ルーター . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
IOS Cisco_core_rrコアルートリフレクタと192.168.2/24ネットワークのアクセスルーター . . . . . . 97
IOS Cisco_pop配信/POPルートリフレクタとIS-IS Level 2-Level 1間リークルーター . . . . . . . . . . . 99
IOS Cisco_accessアクセスIBGPエッジルーター . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
IOS Pagent外部EBGPルーター . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
IOS Dummy外部EBGPルーター . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
略語 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Copyright © 2001, Juniper Networks, Inc.
3
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
参照図
図 1:Test Network Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
図 2:BGP AS Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
図 3:EBGP AS Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
図 4:Connected Access and POP Route Reflector Routers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
図 5:Route Reflector Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
図 6:IS-IS Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
図 7:Multihomed Autonomous System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
図 8:Prevention of Internal Announcements with External Link Failures . . . . . . . . . . . . . . . . . . . 22
図 9:Prevention of External Announcements with External Link Failures . . . . . . . . . . . . . . . . . . . 23
図10:Provision and Prevention of Advertising Intra-AS Routes
. . . . . . . . . . . . . . . . . . . . . . . . . . 34
図11:Manipulation of Announced Aggregate Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
図12:Controlling Traffic Out from an AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
はじめに
ジュニパー社は、Cisco IOSと確実に相互運用可能にすることを目的にJUNOSインターネットソフトウェアを開発し
ました。この文書では、IOSの実践的な知識を使って、JUNOSソフトウェア内にルーティングフィルタを設定する方
法について概説します。各例では、JUNOSコンフィグレーションとIOSコンフィグレーションの両方が示されていま
す。この文書は、特定のトポロジーやコンフィグレーションに関する推奨ではない点に注意してください。
この文書を有効に活用するために、境界ルーターや配信ルーターが取り扱う構造と機能(たとえば、サービスプロバイ
ダBGPルーティングポリシー)に精通しておくことをお奨めします。また、JUNOSソフトウェアとIOSソフトウェア、
ジュニパー社のルーターアーキテクチャ、およびルーティングポリシーに応じたサービスプロバイダ機能に関連するコ
ンフィグレーションについても理解しておくことをお奨めします。
ジュニパー製ルーターの概要
ジュニパー社のルーターは、高速でパケットフォワーディングを実行するだけの単なる高速バックボーンルーターでは
ありません。
次のような役割を担うこともできます。
■ EBGPコネクションのBGP境界ルーター
■ IBGPコネクションの配信ルーター
■ 広帯域幅キャパシティと機能性を備えたアクセス終端デバイス
■ T1-OC192c/STM64リンク対応のAS境界ルーターまたは配信ルーター
どのモデルであっても、ジュニパー社のルーターは、メディアや帯域幅には無関係に、パフォーマンスを低下させるこ
となく、もしくは最小限のみの低下でBGPポリシーとフィルタを処理することができます。
Copyright © 2001, Juniper Networks, Inc.
5
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
テストセットアップ
コンフィグレーションを検証する目的で、コンフィグレーションを調整し、show コマンドなどのコマンド出力を表
示するために、テストネットワーク(図1)をセットアップしました。このテストセットアップは、機能を示すためのも
ので、推奨トポロジーではありません。
セットアップはインタフェースの制限によって制約されています。たとえば、モジュレータはジュニパー社製の装置で
す。特に説明が必要な点は、JUNOSソフトウェアがインストールされたFreeBSDベースのPCが、イーサネットブロ
ードキャストベースのコアとなっている点です。Ciscoルーターとしては、2500、1600、3810といったローエン
ドの装置を用いています。ただし、これらのルーターがポリシーに影響を及ぼすことはありません。つまり、同じルー
ルがハイエンドのルーターにも適用されます。
図 1: Test Network Topology
UNIX
Lunkan
192.168.1/24
172.16.2/24
.2
.1
.1
M10
Lo0 1.1.1.1/32
Lo0 1.1.1.2/32
Lena
.2
Ida
.22
Null0 2.2/16
Plus Route Generation
M20
1.1.1.244/30
Access
.2
M40
.3
Null0 111.111/16
Null0 222.222/16
Lo1 100.100.1.1/32
Lo2 100.100.2.1/32
Lo0 100.200.1.1/32
Lo0 100.200.2.1/32
Pagent
Lo0 1.1.1.2/32
Lo0 1.1.1.3/32
1.1.0.0/24
Lo0 1.1.1.7/32
194.68.128/24
Cisco_pop
Cisco_border
.5
1.1.1.248/30
.4
.3
3
Lo0 1.1.1.5/32
Cisco_core_rr
Null0 192.168.2/24
Dummy
.3
Null0 3.3/16
Plus Martians
Lo0 1.1.1.4/32
.6
Lo0 1.1.1.6/32
6
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
EGP
使用したEGPは、JUNOSソフトウェアとIOSの両方でサポートされる、拡張機能を備えたBGP4です。図2は、BGP
ASテストセットアップを示しています。
図 2: BGP AS Setup
UNIX
Lunkan
M10
Ida
Lena
Pagent
AS 2222
M40
M20
Access
Cisco_pop
Cisco_border
Dummy
AS 3333
Cisco_core_rr
Copyright © 2001, Juniper Networks, Inc.
7
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
EBGP
2本の外部コネクションは、redundantな外部ピアリングを装備するために必要な機能を示しています(図3)。どちら
の境界ルーターも、同じプリフィックスをアナウンスし、ホットポテトルーティングと呼ばれるルーティング構造を示
しています。後に、コンフィグレーションは、外部の応答トラフィックを変更するために、修正されます。
図 3: EBGP AS Setup
UNIX
Lunkan
AS 1111
M10
Ida
Lena
Pagent
AS 2222
M40
M20
Access
Cisco_pop
Cisco_border
Dummy
AS 3333
Cisco_core_rr
IBGP
IBGPは、典型的なサービスプロバイダの構成によく似た構成になっています。フルメッシュ問題は、ルートリフレク
タを使用することで解決されています。推奨される方法ではありませんが、デモンストレーション目的で、2階層のル
ートリフレクタを使用しています。ルートリフレクタは自身の最適ルートだけをアドバタイズするため、レイヤ数が多
過ぎると、クライアントが自分の立場からは最適とは言えないルートを受け取ることがあります。
コンフェデレーションを使用しない主な理由は、ルーターリフレクタまたはコンフェデレーションのどちらを使うかは
特に重要ではないからです。このテストで、コンフェデレーションを使用するには、より多くのルーターが必要となり
ます。それが、ルートリフレクタを選択した理由です。ただし、ルートリフレクタ以外にコンフェデレーションを追加
しても特に問題はありません。多くの大手サービスプロバイダのネットワークでは、IBGPフルメッシュとIGPデータ
ベースの両方のサイズを縮小する目的で、コンフェデレーションソリューションが実装されています。
IBGPはリソースネットワークのすべての内部プロビジョニングを実行し、IGPはすべてのリンクとループバックアド
レスのルーティングを実行します。
8
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
ピアリングは、2層のルートリフレクタ階層を中心に構成されています。図4は、境界ルーター、コアルートリフレク
タ、およびPOPルーター間のIBGPピアリングの一層目のルートリフレクタ構造を示しています。
図 4: Connected Access and POP Route Reflector Routers
AS 1111
UNIX
Lunkan
M10
Lena
Pagent
AS 2222
M40
Access
M20
Ida
Cisco_pop
Cisco_border
Dummy
AS 3333
Cisco_core_rr
Copyright © 2001, Juniper Networks, Inc.
9
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
二層目のルートリフレクタレイヤは、POP配信ルーターが、そのPOPの地域内のアクセスルーターに対応するルート
リフレクタとなっている地域または大規模POPをモデル化しています(図5)。
図 5: Route Reflector Topology
AS 1111
UNIX
Lunkan
M10
Lena
Pagent
Ida
AS 2222
M40
Access
M20
Cisco_pop
Cisco_border
Dummy
AS 3333
Cisco_core_rr
IGP
大手サービスプロバイダのネットワークでもっとも広く使用されているIGPが、RFC 1195で規定されているIS-ISで
す。アドレッシングは、NSAPアドレスのユニークなESI部分としてループバックアドレスを使用するクラシカルな方
式に準じています。IS-IS構造(図6)は、Level 2専用コアとLevel 1専用スタブアクセスエリアを持つ階層型構造です。
このトポロジーは推奨デザインではありませんが、IBGPをLevel 1エリアで動作させるために必要な機能を示してい
ます。リンクとループバックが、IS-IS内の唯一のルートです。Level 2コアからのループバックは、BGPネクストホ
ップを動作させるために、Level 1エリアへリークされます。
10
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
図 6: IS-IS Setup
IS-IS Level 2
UNIX
Lunkan
M10
Lena
IS-IS Level 1
Pagent
Ida
M40
Access
M20
Cisco_pop
Cisco_border
Dummy
Cisco_core_rr
NSAPアドレスの構造に留意してください。NETプリフィックスが地域に応じて割り当てられている場合は、同じ地
域内のすべてのルーターが、ESI部分だけが異なる同じNETプリフィックスを持つ必要があります。地域内に多数のル
ーターが存在する場合は、必要に応じて、階層型IS-ISトポロジーを構築することができます。その後、Level 2専用か
ら、Level 1/Level 2を経て、Level 1ルーターへの変更はかなり容易に実行することができます。
例:
NETプリフィックスが地域に従って割り当てられている場合
Stockholm-> 47.0001.[loopback].00
Copenhagen -> 47.0002.[loopback].00
Helsinki-> 47.0003.[loopback].00
Oslo-> 47.0004.[loopback].00
Stockholm内のすべてのルーターは、ESI部分だけが異なる同じNET 47.0001プリフィックスを持ちます。
初めは、MPLSトラフィックエンジニアリングLSPやMPLS VPNなどのサービス実装を簡易化し容易にするために、
1つのリンクステートデータベースを持つLevel 2専用としてネットワークを構築することをお奨めします。前提とす
るIGP (IS-IS)のサイズは、IGPで搬送されるLSPとIPプリフィックスの数で決まり、比較的小さいサイズになります。
したがって、Level 2専用アプローチを実現可能な前提条件となります。
Copyright © 2001, Juniper Networks, Inc.
11
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
以下は、IS-ISが搬送可能なIPプリフィックス数を算出するための計算式です。
ルーターあたりの最大LSPフラグメント数 = 256
最大LSPサイズ = 1492
最大TLV = 255バイト
LSPヘッダ = 27バイト
最大LSPサイズ - LSPヘッダ = 1492 - 27 = 1,465バイト/ペイロード
TLVあたり2バイト
TLVあたり2バイト x 6 TLV = 12バイトのオーバーヘッド
1465 - 12 = LSPあたり1453バイト
IPプリフィックスが12バイトのため、1453/12 = LSPあたり121 IPプリフィックス
256 x 121 = ルーターあたり30,976 IPプリフィックス
ルーティングポリシー
ここでは、JUNOSとIOSを使った例を取り上げ、通常のサービスプロバイダネットワークにルーティングポリシーを
実装する必要がある理由を説明していきます。
IGPがBGPネクストホップルートを搬送
多くの場合、リソースネットワークは転送ネットワークから分離されています。リソースネットワークは、WWW、メ
ール、FTPサービスなどを備えたサーバーファームの場合があります。転送ネットワークは、リンクとループバック
(たとえば、ルーター間のリンク)です。サービスプロバイダネットワーク内でルートをプロビジョニングするための
もっとも一般的なモデルは、それらをIBGPによってアナウンスし、IGPによる再帰的なルックアップを通じて搬送す
るやり方です。この実装は、ネットワークを大幅に拡張することができ、さらにBGP内のポリシーを使ってフィルタ
することができるため、多くの利点を備えています。リンクステートデータベース内のフィルタ機能は、かなり制限さ
れているため、できるだけ使用は避けるべきです。さらに、外部ルートは、送信元ですべての外部ルートに nexthop-self をマークすることで、IGPによる再帰ルックアップを通じて搬送されます。別の方法として、ネットワー
クは、外部ルートをIGP内でパッシブとしてマークするか、直接接続されたサブネットとしてインポートすることがで
きます。これらは、next-hop-self を使用してBGPネクストホップを解決する方法の代替となるソリューショ
ンです。多数のルーターと大規模なIGPが存在しているために、ネットワークが、複数のIS-ISエリア(Level 1とLevel
2)から構成されている場合は、BGPネクストホップを解決させるために、いくつかの機能が必要となります。
12
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
ネクストホップを解決するためのLevel 2からLevel 1ルーターへのIS-ISルートのリーク
ここでは、JUNOSソフトウェアがBGPネクストホップを動作させるために、IS-IS Level 2からLevel 1へのルート
リークのコンセプトをどのように処理しているかを説明します。この機能は、Cisco用語で「ルートリーク(route
leaking)」と呼ばれています。
IOSの例
この例は、ループバックをリークすることができるLevel 1/Level 2 Ciscoルーターのコンフィグレーションの一部
を示しています(たとえば、BGPネクストホップ解決)。
!
router isis
redistribute isis ip level-2 into level-1 distribute-list 100 /* Leak
policy from L2 db -> L1 db */
passive-interface Loopback0
net 47.0001.0010.0100.1005.00
metric-style wide/* TLV 135 used for extended metrics, no TLV 128 */
max-lsp-lifetime 65535
lsp-refresh-interval 65000
spf-interval 10 100 500
prc-interval 5 100 250
lsp-gen-interval 10 20 2500
log-adjacency-changes
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.5
bgp log-neighbor-changes
timers bgp 30 90
neighbor internal peer-group
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor pop peer-group
neighbor pop remote-as 1111
neighbor pop update-source Loopback0
neighbor pop_rr peer-group
neighbor pop_rr remote-as 1111
neighbor pop_rr update-source Loopback0
neighbor pop_rr route-reflector-client
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.6 peer-group internal
neighbor 1.1.1.7 peer-group pop_rr
no auto-summary
!
access-list 1 permit 1.1.1.0 0.0.0.255
!
Copyright © 2001, Juniper Networks, Inc.
13
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
JUNOSの例
この例は、ループバックをリークすることができるLevel 1/Level 2 Juniperルーターのコンフィグレーションの一部
を示しています(たとえば、BGPネクストホップ解決)。
routing-options {
router-id 1.1.1.3;
autonomous-system 1111;
}
protocols {
bgp {
traceoptions {
file bgp;
flag state detail;
}
log-updown;
group internal {
type internal;
local-address 1.1.1.3;
neighbor 1.1.1.1;
neighbor 1.1.1.6;
}
group pop_rr {
type internal;
local-address 1.1.1.3;
cluster 1.1.1.5;
neighbor 1.1.1.7;
}
group pop {
type internal;
local-address 1.1.1.3;
neighbor 1.1.1.4;
}
}
isis {
traceoptions {
file isis;
flag state detail;
}
export isis_leak;/* Leak policy */
lsp-lifetime 65535; /* Default 1200 seconds */
level 2 wide-metrics-only; /* TLV 135 used for extended metrics,
default both TLV 128/135 used */
interface fxp0.0 {
level 1 disable;/* Level 2 only to Core */
}
interface fxp1.0 {
level 2 disable;/* Level 1 only to access stub area */
}
}
}
14
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
policy-options {
policy-statement isis_leak {
term one {
from {
protocol isis;
level 2;
route-filter 1.1.1.0/24 longer; /* Prefix where next hop
for BGP are within lo0 */
}
to {
protocol isis;
/*To L1 area */
level 1;
}
}
}
}
隣接関係の例
この例は、JuniperルーターのIS-IS Level 1隣接ルーターとCiscoルーター(cisco_access)のLevel 1隣接ルーター
を示しています。
lunkan@ida> show isis adjacency
IS-IS adjacency database:
Interface
System
fxp0.0
cisco_pop
fxp0.0
cisco_border
fxp0.0
cisco_core_rr
fxp0.0
lena
fxp0.0
lunkan
fxp1.0
cisco_access
L
2
2
2
2
2
1
State
Up
Up
Up
Up
Up
Up
Hold (secs)
23
28
28
26
8
7
SNPA
0:0:c:34:74:5b
0:60:9:c4:23:18
0:d0:ba:58:7e:4b
0:2:b3:22:38:63
0:2:b3:22:38:61
0:d0:ba:58:81:dd
JuniperルーターのIS-ISデータベースの例
JUNOSソフトウェアは、他のすべてのルーターのlo0アドレスをLevel 1データベースへエクスポートします。
lunkan@ida> show isis database detail
IS-IS level 1 link-state database:
ida.00-00 Sequence: 0x1d, Checksum: 0x9774, Lifetime: 64666 secs
IS neighbor:
cisco_access.01 Metric:
10
IP prefix:
1.1.1.248/30 Metric:
20 Internal
IP prefix:
1.1.1.6/32 Metric:
10 Internal
IP prefix:
1.1.1.5/32 Metric:
10 Internal
IP prefix:
1.1.1.1/32 Metric:
10 Internal
IP prefix:
1.1.1.4/32 Metric:
10 Internal
IP prefix:
1.1.1.2/32 Metric:
10 Internal
IP prefix:
1.1.1.3/32 Metric:
0 Internal
IP prefix:
1.1.1.244/30 Metric:
10 Internal
cisco_access.00-00 Sequence: 0x3, Checksum: 0xd715, Lifetime: 64140 secs
IS neighbor:
cisco_access.01 Metric:
10
IP prefix:
1.1.1.7/32 Metric:
0 Internal
IP prefix:
1.1.1.244/30 Metric:
10 Internal
cisco_access.01-00 Sequence: 0x3, Checksum: 0x4b86, Lifetime: 64175 secs
IS neighbor:
ida.00 Metric:
0
IS neighbor:
cisco_access.00 Metric:
0
IS-IS level 2 link-state database:
lunkan.00-00 Sequence: 0x16, Checksum: 0x3c69, Lifetime: 62850 secs
IS neighbor:
lunkan.02 Metric:
10
IP prefix:
1.1.0.0/24 Metric:
10 Internal
Copyright © 2001, Juniper Networks, Inc.
15
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
IP prefix:
1.1.1.1/32 Metric:
0 Internal
lunkan.02-00 Sequence: 0x6, Checksum: 0x920c, Lifetime: 62850 secs
IS neighbor:
cisco_pop.00 Metric:
0
IS neighbor:
cisco_core_rr.00 Metric:
0
IS neighbor:
cisco_border.00 Metric:
0
IS neighbor:
ida.00 Metric:
0
IS neighbor:
lena.00 Metric:
0
IS neighbor:
lunkan.00 Metric:
0
lena.00-00 Sequence: 0x13, Checksum: 0x815c, Lifetime: 62974 secs
IS neighbor:
lunkan.02 Metric:
10
IP prefix:
1.1.0.0/24 Metric:
10 Internal
IP prefix:
194.68.128.0/24 Metric:
10 Internal
IP prefix:
1.1.1.2/32 Metric:
0 Internal
ida.00-00 Sequence: 0x21, Checksum: 0x6128, Lifetime: 64666 secs
IS neighbor:
lunkan.02 Metric:
10
IP prefix:
1.1.1.7/32 Metric:
10 Internal
IP prefix:
1.1.0.0/24 Metric:
10 Internal
IP prefix:
1.1.1.244/30 Metric:
10 Internal
IP prefix:
1.1.1.3/32 Metric:
0 Internal
cisco_border.00-00 Sequence: 0xb, Checksum: 0x71c8, Lifetime: 62842 secs
IS neighbor:
lunkan.02 Metric:
10
IP prefix:
194.68.128.0/24 Metric:
0 Internal
IP prefix:
1.1.1.4/32 Metric:
0 Internal
IP prefix:
1.1.0.0/24 Metric:
10 Internal
cisco_pop.00-00 Sequence: 0xd, Checksum: 0x20c2, Lifetime: 64009 secs
IS neighbor:
lunkan.02 Metric:
10
IP prefix:
1.1.1.248/30 Metric:
10 Internal
IP prefix:
1.1.1.5/32 Metric:
0 Internal
IP prefix:
1.1.0.0/24 Metric:
10 Internal
cisco_core_rr.00-00 Sequence: 0xc, Checksum: 0xb9b1, Lifetime: 62842 secs
IS neighbor:
lunkan.02 Metric:
10
IP prefix:
1.1.1.6/32 Metric:
0 Internal
IP prefix:
1.1.0.0/24 Metric:
10 Internal
cisco_access.00-00 Sequence: 0x7, Checksum: 0x7373, Lifetime: 64086 secs
IS neighbor:
cisco_access.01 Metric:
10
IP prefix:
1.1.1.244/30 Metric:
10 Internal
IP prefix:
1.1.1.7/32 Metric:
0 Internal
cisco_access.01-00 Sequence: 0x1, Checksum: 0x69f0, Lifetime: 59794 secs
IS neighbor:
ida.00 Metric:
0
IS neighbor:
cisco_access.00 Metric:
0
ルートテーブルの例
BGPドリブンのルートは、Level 1エリア内のアクセスルーターと同様に、到達可能でなければなりません。
lunkan@ida> show route
inet.0: 19 destinations, 19 routes (19 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.0.0/24
1.1.0.3/32
1.1.1.1/32
1.1.1.2/32
1.1.1.3/32
1.1.1.4/32
16
*[Direct/0] 01:41:20
> via fxp0.0
*[Local/0] 01:41:55
Local
*[IS-IS/18] 00:48:26, metric 10, tag 2
> to 1.1.0.1 via fxp0.0
*[IS-IS/18] 00:48:33, metric 10, tag 2
> to 1.1.0.2 via fxp0.0
*[Direct/0] 01:41:55
> via lo0.0
*[IS-IS/18] 00:48:33, metric 10, tag 2
> to 1.1.0.4 via fxp0.0
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
1.1.1.5/32
*[IS-IS/18] 00:48:33, metric 10, tag 2
> to 1.1.0.5 via fxp0.0
1.1.1.6/32
*[IS-IS/18] 00:48:33, metric 10, tag 2
> to 1.1.0.6 via fxp0.0
1.1.1.7/32
*[IS-IS/15] 00:26:14, metric 10, tag 1
> to 1.1.1.246 via fxp1.0
1.1.1.244/30
*[Direct/0] 01:41:55
> via fxp1.0
1.1.1.245/32
*[Local/0] 01:41:55
Local
1.1.1.248/30
*[IS-IS/18] 00:27:52, metric 20, tag 2
> to 1.1.0.5 via fxp0.0
2.2.0.0/16
*[BGP/170] 00:18:56, MED 0, localpref 100, from 1.1.1.1
AS path: 2222 I
> to 1.1.0.2 via fxp0.0
[BGP/170] 00:18:56, MED 0, localpref 100, from 1.1.1.6
AS path: 2222 I
> to 1.1.0.2 via fxp0.0
3.3.0.0/16
*[BGP/170] 00:48:09, MED 1, localpref 100, from 1.1.1.1
AS path: 3333 I
> to 1.1.0.2 via fxp0.0
[BGP/170] 00:47:33, MED 1, localpref 100, from 1.1.1.6
AS path: 3333 I
> to 1.1.0.2 via fxp0.0
10.0.0.0/8
*[BGP/170] 00:48:09, MED 1, localpref 100, from 1.1.1.1
AS path: 3333 ?
> to 1.1.0.2 via fxp0.0
[BGP/170] 00:47:33, MED 1, localpref 100, from 1.1.1.6
AS path: 3333 ?
> to 1.1.0.2 via fxp0.0
100.100.1.1/32
*[BGP/170] 00:22:11, MED 0, localpref 100, from 1.1.1.7
AS path: ?
> to 1.1.1.246 via fxp1.0
100.100.2.1/32
*[BGP/170] 00:22:11, MED 0, localpref 100, from 1.1.1.7
AS path: ?
> to 1.1.1.246 via fxp1.0
192.168.1.0/24
*[BGP/170] 00:48:20, localpref 100, from 1.1.1.1
AS path: I
> to 1.1.0.1 via fxp0.0
[BGP/170] 00:48:26, localpref 100, from 1.1.1.6
AS path: I
> to 1.1.0.1 via fxp0.0
194.68.128.0/24
*[IS-IS/18] 00:48:33, metric 10, tag 2
> to 1.1.0.4 via fxp0.0
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
47.0001.0010.0100.1003.00/80
*[Direct/0] 01:41:55
> via lo0.0
Copyright © 2001, Juniper Networks, Inc.
17
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
CiscoアクセスルーターのIS-IS Level 1コンフィグレーションの例
!
router isis
passive-interface Loopback0
net 47.0001.0010.0100.1007.00
is-type level-1/* Pure L1 ISIS adjacency allowed */
metric-style wide/* TLV 135 used for extended metrics, no TLV 128 */
max-lsp-lifetime 65535
lsp-refresh-interval 65000
spf-interval 10 100 500
prc-interval 5 100 250
lsp-gen-interval 10 20 2500
log-adjacency-changes
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.7
bgp log-neighbor-changes
timers bgp 30 90
redistribute connected route-map access
neighbor access peer-group
neighbor access remote-as 1111
neighbor access update-source Loopback0
neighbor 1.1.1.3 peer-group access
neighbor 1.1.1.5 peer-group access
no auto-summary
!
access-list 1 permit 100.100.1.1
access-list 1 permit 100.100.2.1
route-map access permit 10
match ip address 1
!
アクセスルーターIS-IS Level 1隣接関係の例
この隣接関係は、Level 1だけです。
cisco_access#sh clns nei det
System Id
Interface
SNPA
Protocol
ida
Et0
0002.b322.39c8
IS-IS
Area Address(es): 47.0001
IP Address(es): 1.1.1.245*
Uptime: 00:10:50
cisco_access#
18
State
Holdtime
Type
Up
25
L1
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
アクセスルーターIS-ISデータベースの例
この例は、Level 2ルーターをLevel 1エリアへリークするテストセットアップ内のすべてのルーターのlo0アドレス
を持つインターエリアルーターを示しています。
cisco_access#sh isis dat det
IS-IS Level-1 Link State Database:
LSPID
LSP Seq Num LSP Checksum LSP Holdtime
ATT/P/OL
ida.00-00
0x0000001D
0x9774
65332
Area Address: 47.0001
NLPID:
0xCC
Router ID:
1.1.1.3
IP Address:
1.1.1.3
Hostname: ida
Metric: 10
IS cisco_access.01
Metric: 10
IS-Extended cisco_access.01
Metric: 10
IP 1.1.1.244 255.255.255.252
Metric: 0
IP 1.1.1.3 255.255.255.255
Metric: 74
IP 1.1.1.2 255.255.255.255
Metric: 74
IP 1.1.1.4 255.255.255.255
Metric: 74
IP 1.1.1.1 255.255.255.255
Metric: 74
IP 1.1.1.5 255.255.255.255
Metric: 74
IP 1.1.1.6 255.255.255.255
Metric: 84
IP 1.1.1.248 255.255.255.252
Metric: 10
IP 1.1.1.244/30
Metric: 0
IP 1.1.1.3/32
Metric: 10
IP-Interarea 1.1.1.2/32
Metric: 10
IP-Interarea 1.1.1.4/32
Metric: 10
IP-Interarea 1.1.1.1/32
Metric: 10
IP-Interarea 1.1.1.5/32
Metric: 10
IP-Interarea 1.1.1.6/32
Metric: 20
IP-Interarea 1.1.1.248/30
cisco_access.00-00 * 0x00000003
0xD715
64805
Area Address: 47.0001
NLPID:
0xCC
Hostname: cisco_access
IP Address:
1.1.1.7
Metric: 10
IP 1.1.1.244/30
Metric: 0
IP 1.1.1.7/32
Metric: 10
IS-Extended cisco_access.01
cisco_access.01-00 * 0x00000003
0x4B86
64839
Metric: 0
IS-Extended cisco_access.00
Metric: 0
IS-Extended ida.00
cisco_access#
Copyright © 2001, Juniper Networks, Inc.
0/0/0
0/0/0
0/0/0
19
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
アクセスルーターのルートテーブル
Level 1エリアに対してBGPネクストホップを動作させるために、Level 2ルートがida Level 1/Level 2ルーターか
らリークされます。
cisco_access#sh ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS
inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
1.1.1.1/32 [115/20] via 1.1.1.245, Ethernet0
1.1.1.3/32 [115/10] via 1.1.1.245, Ethernet0
1.1.1.2/32 [115/20] via 1.1.1.245, Ethernet0
1.1.1.5/32 [115/20] via 1.1.1.245, Ethernet0
1.1.1.4/32 [115/20] via 1.1.1.245, Ethernet0
1.1.1.7/32 is directly connected, Loopback0
ia
1.1.1.6/32 [115/20] via 1.1.1.245, Ethernet0
1.1.1.244/30 is directly connected, Ethernet0
ia
1.1.1.248/30 [115/30] via 1.1.1.245, Ethernet0
2.0.0.0/16 is subnetted, 1 subnets
B
2.2.0.0 [200/0] via 1.1.1.2, 00:05:32
100.0.0.0/32 is subnetted, 2 subnets
C
100.100.1.1 is directly connected, Loopback1
C
100.100.2.1 is directly connected, Loopback2
3.0.0.0/16 is subnetted, 1 subnets
B
3.3.0.0 [200/1] via 1.1.1.2, 00:08:49
B
10.0.0.0/8 [200/1] via 1.1.1.2, 00:08:49
B
192.168.1.0/24 [200/0] via 1.1.1.1, 00:08:49
cisco_access#
i
i
i
i
i
C
i
C
i
20
ia
L1
ia
ia
ia
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
アクセスルーターBGPテーブルの例
EBGPルートのネクストホップは1.1.1.2と1.1.1.4で、ASで生成されたルートのネクストホップは1.1.1.1と
1.1.1.6です。
cisco_access#sh ip bgp
BGP table version is 14, local router ID is 1.1.1.7
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
* i2.2.0.0/16
*>i
* i3.3.0.0/16
*>i
* i100.100.0.0/16
*>i
*> 100.100.1.1/32
Next Hop
1.1.1.2
1.1.1.2
1.1.1.2
1.1.1.2
1.1.1.4
1.1.1.4
0.0.0.0
Metric LocPrf Weight Path
0
101
0 2222 i
0
101
0 2222 i
1
100
0 3333 i
1
100
0 3333 i
100
0 i
100
0 i
0
32768 ?
アグリゲーション
シングルホーム(境界ルーター1台のみ)の外部BGPコネクションがある場合は、アナウンスメントに特に配慮する必要
はありません。一般に、プリフィックスをアナウンスするためのアグリゲートルートとしてスタティックルートを使用
することができます。
インターネット相互接続点やプライベートピアなどの他の多くのものと接続する複数の外部コネクションがある場合
は、通常、複数台の境界ルーターがあります。複数の外部コネクションを取り扱うための、よく知られた頻繁に実行さ
れる方式が、ホットポテトルーティングと呼ばれるコンセプトです。この場合、一般に、IBGP内では、EBGPメトリ
ックは一切交換されません。ホストは、いずれかの外部ピアを通じてパケットを送信し、別のピアを通じて応答を取得
することができます。図7は、複数の外部コネクションが存在する際に、プリフィックスアナウンスメントを制御する
ことがいかに重要かを示しています。AS 65000は、マルチホームで、2本の外部コネクションを持っています。それ
らの両方に192.168/16プリフィックスがアナウンスされます。両方の境界ルーターから入力ルートを受け取ります。
Copyright © 2001, Juniper Networks, Inc.
21
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
図 7: Multihomed Autonomous System
AS 65000
border_1
AS 64512
10/8
192.168/16
192.168/16
172.16/12
AS 64513
border_2
10/8
192.168/16
172.16/12
192.168/16
物理リンク障害などによって、境界ルーターのいずれかがピアを廃棄した場合、そのルーターは、ブラックホールの発
生を避けるために、内部ASへの外部ルートのアナウンスを停止する必要があります(図8)。
図 8: Prevention of Internal Announcements with External Link Failures
AS 65000
border_1
AS 64512
192.168/16
AS 64513
border_2
10/8
172.16/12
22
192.168/16
192.168/16
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
このシナリオは、IGPを使用して内部リンクとループバックだけを搬送している場合とデフォルトルートを使用してい
ない場合には、容易に解決することができます。デフォルトルートを使用している場合は、ブラックホールシナリオを
避けるために、十分な注意を払ってそれらを使用する必要があります。内部ネットワークが切断された場合(IBGPピア
が存在しなくなった場合)は、境界ルーターによるプリフィックスのアナウンスを避けることがなおさら重要となりま
す。この状況では、境界ルーターが外部ピアへプリフィックスをアドバタイズしなくなるため、パケットはそのルータ
ーへは送信されなくなります(図9)。
図 9: Prevention of External Announcements with External Link Failures
AS 65000
border_1
AS 64512
192.168/16
AS 64513
border_2
10/8
172.16/12
192.168/16
192.168/16
外部アナウンスメントは条件付きです。つまり、アグリゲートされたプリフィックスに関与しているルートがない場合、
そのアグリゲートプリフィックスはアドバタイズされません。
Cisco IOSプリフィックスアグリゲートの例
この例は、アグリゲートプリフィックスの条件付きアドバタイズメントという同じ機能を実行するCiscoルーターと
Juniperルーターのコンフィグレーションの一部を示しています。
!
router bgp 1111
no synchronization
aggregate-address 100.100.0.0 255.255.0.0 summary-only # Aggregation of
100.100/16 and suppress of routes within prefix with longer mask
timers bgp 30 90
neighbor internal peer-group
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor internal next-hop-self
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.6 peer-group internal
neighbor 194.68.128.22 remote-as 2222
neighbor 194.68.128.33 remote-as 3333
no auto-summary
!
Copyright © 2001, Juniper Networks, Inc.
23
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
アナウンスされるルートは、次のとおりです。
cisco_border#sh ip bgp nei 194.68.128.33 adv
BGP table version is 157, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
*> 2.2.0.0/16
Next Hop
Metric LocPrf Weight Path
194.68.128.22
0
*> 100.100.0.0/16 0.0.0.0
*>i192.168.1.0
1.1.1.1
0 2222 i
32768 i
100
0i
cisco_border#
IOSは、atomic-aggregate 属性と、アグリゲートプリフィックスのデフォルトアクションとして Origin
igpを追加します。
cisco_border#sh ip bgp 100.100.0.0
BGP routing table entry for 100.100.0.0/16, version 153
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to peer-groups:
internal
Advertised to non peer-group peers:
194.68.128.33
Local, (aggregated by 1111 1.1.1.4)
0.0.0.0 from 0.0.0.0 (1.1.1.4)
Origin IGP, localpref 100, weight 32768, valid, aggregated, local,
atomic-aggregate, best
cisco_border#
この例は、比較的長いマスクを持つルートが拒否されていることを検証します。
cisco_border#sh ip bgp
BGP table version is 157, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
* i2.2.0.0/16
* i
*>
*
* i3.3.0.0/16
* i
*
*>
* i10.0.0.0
* i
*
*>
*> 100.100.0.0/16
s i100.100.1.1/32
s>i
s i100.100.2.1/32
s>i
*>i192.168.1.0
Network
* i
cisco_border#
24
Next Hop
1.1.1.2
1.1.1.2
194.68.128.22
194.68.128.22
1.1.1.2
1.1.1.2
194.68.128.33
194.68.128.33
1.1.1.2
1.1.1.2
194.68.128.33
194.68.128.33
0.0.0.0
1.1.1.7
1.1.1.7
1.1.1.7
1.1.1.7
1.1.1.1
Next Hop
1.1.1.1
Metric LocPrf Weight Path
0
100
0 2222 i
0
100
0 2222 i
0
0 2222 i
1
0 3333 2222 i
1
100
0 3333 i
1
100
0 3333 i
0 2222 3333 i
1
0 3333 i
1
100
0 3333 ?
1
100
0 3333 ?
0 2222 3333 ?
1
0 3333 ?
32768 i
0
100
0 ?
0
100
0 ?
0
100
0 ?
0
100
0 ?
100
0 i
Metric LocPrf Weight Path
100
0 i
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
JUNOSプリフィックスアグリゲートの例
この例は、前出のIOSの例に相当するJUNOSコンフィグレーションの一部分を示しています。
routing-options {
aggregate {
route 100.100.0.0/16;/* Aggregation of 100.100/16 if more
specific exist in route-table */
}
router-id 1.1.1.2;
autonomous-system 1111;
}
protocols {
bgp {
path-selection always-compare-med;
traceoptions {
file bgp;
flag state;
}
log-updown;
group external {
type external;
local-address 194.68.128.2;
export ebgp;
peer-as 2222;
neighbor 194.68.128.22 {
peer-as 2222;
}
neighbor 194.68.128.33 {
peer-as 3333;
}
}
group internal {
type internal;
local-address 1.1.1.2;
export internal;
neighbor 1.1.1.1;
neighbor 1.1.1.6;
}
}
policy-statement ebgp {
term one {
from {
protocol aggregate;
route-filter 100.100.0.0/16 exact;
/* Aggregated route */
}
then accept;
}
term two {
from {
route-filter 100.100.0.0/16 longer;
/* Deny routes (suppress) with longer mask than /16 for
prefix 100.100/16 */
}
then reject;
}
}
}
Copyright © 2001, Juniper Networks, Inc.
25
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
この例は、アドバタイズされたルートを示しています。Originator フィールドがINCOMPLETEとしてマークさ
れている点に注意してください。
lunkan@lena# run show route advertising-protocol bgp 194.68.128.33 detail
inet.0: 19 destinations, 19 routes (19 active, 0 holddown, 0 hidden)
Prefix
Nexthop
MED
Lclpref AS path
100.100.0.0/16 (3 entries, 1 announced)
BGP 194.68.128.33 (External AS 3333)
Nexthop: Self
AS path: ? <Originator>
Cluster list: 1.1.1.1 1.1.1.3
Originator ID: 1.1.1.7
[edit]
lunkan@lena#
ルート100.100/16は次のとおりです。
lunkan@lena> show route 100.100/16 detail all
inet.0: 24 destinations, 24 routes (23 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
100.100.0.0/16 (2 entries, 1 announced)
*Aggregate
Preference: 130
Next hop type: Reject
State: <Active Int Ext>
Age: 5d 0:42:08
Task: Aggregate
Announcement bits (3): 0-KRT 4-BGP.0.0.0.0+179
5-BGP_Sync_Any
AS path: ? <Originator>
Cluster list: 1.1.1.1 1.1.1.3
Originator ID: 1.1.1.7
Flags: Depth: 0
Active
AS path list:
AS path: ? <Originator> Cluster list: 1.1.1.1.1.1.1.3
Originator ID: 1.1.1.7 Refcount: 2
Contributing Routes (2):
100.100.1.1/32
proto BGP
100.100.2.1/32
proto BGP
BGP
26
Preference: 170/-101/* This route is from IOS border
router and is ignored */
Source: 1.1.1.1
Nexthop: 2.2.2.20 via fxp0.0, selected
State: <Int Ext>
Inactive reason: Route Preference
Local AS: 1111 Peer AS: 1111
Age: 46:30
Metric2: 10
Task: BGP_1111.1.1.1.1+3777
AS path: I <Atomic Originator>
Aggregator: 1111 1.1.1.4
Cluster list: 1.1.1.1
Originator ID: 1.1.1.4/* IOS default change originate-id
to itself */
BGP next hop: 1.1.1.4
Localpref: 100
Router ID: 1.1.1.1
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
100.100.1.1/32 (1 entry, 1 announced)/* This is the contributing route
from IOS access router */
*BGP
Preference: 170/-101
Source: 1.1.1.1
Nexthop: 2.2.2.17 via fxp0.0, selected
State: <Active Int Ext>
Local AS: 1111 Peer AS: 1111
Age: 30:02
Metric: 0
Metric2: 20
Task: BGP_1111.1.1.1.1+179
Announcement bits (3): 0-KRT 3-Aggregate 5-BGP_Sync_Any
AS path: ? <Originator> /* Note IOS add Origin incomplete
default for provision of routes*/
Cluster list: 1.1.1.1 1.1.1.3
Originator ID: 1.1.1.7
Communities: 1111:1
BGP next hop: 1.1.1.7
Localpref: 100
Router ID: 1.1.1.1
100.100.2.1/32 (1 entry, 1 announced)/* This is the contributing route
from IOS access router */
*BGP
Preference: 170/-101
Source: 1.1.1.1
Nexthop: 2.2.2.17 via fxp0.0, selected
State: <Active Int Ext>
Local AS: 1111 Peer AS: 1111
Age: 30:02
Metric: 0
Metric2: 20
Task: BGP_1111.1.1.1.1+179
Announcement bits (3): 0-KRT 3-Aggregate 5-BGP_Sync_Any
AS path: ? <Originator> /* Note IOS add Origin incomplete
default for provision of routes*/
Cluster list: 1.1.1.1 1.1.1.3
Originator ID: 1.1.1.7
Communities: 1111:2
BGP next hop: 1.1.1.7
Localpref: 100
Router ID: 1.1.1.1
lunkan@lena>
この例は、EBGP隣接ルーターのルートテーブルを示しています。そこで、Ciscoルーターが選択されています。
dummy#sh ip bgp
BGP table version is 78, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
*> 3.3.0.0/16
*> 10.0.0.0
*> 33.33.0.0/16
* 100.100.0.0/16
*>
* 100.200.0.0/16
*>
*> 111.111.0.0/16
*
*> 222.222.0.0/16
*
dummy#
Copyright © 2001, Juniper Networks, Inc.
Next Hop
0.0.0.0
0.0.0.0
0.0.0.0
194.68.128.2
194.68.128.3
194.68.128.2
194.68.128.3
194.68.128.2
194.68.128.3
194.68.128.2
194.68.128.3
Metric LocPrf Weight Path
0
32768 i
0
32768 i
0
32768 i
0 1111
0 1111
0 1111
0 1111
0 1111
0 1111
0 1111
0 1111
? /*JUNOS*/
I /*IOS*/
?
i
?
?
?
?
27
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
アグリゲーションルートの Originate フィールドがIGPとしてマークされているため、デフォルトではCiscoルー
ターが選択されます。Origin は MED より優先順位が高いため、問題が生じることがあります。この問題を解決す
るために、as-path を先頭に付加するか、同じ構造( Origin
igp )にルートを挿入することができます。
この例は同じアグリゲートをアナウンスする場合のIOSとJUNOSソフトウェアの相違点を示しています。
dummy#sh ip bgp 100.100.0.0
BGP routing table entry for 100.100.0.0/16, version 77
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x208
Advertised to peer-groups:
external
1111
194.68.128.2 from 194.68.128.2 (1.1.1.2)/* JUNOS router */
Origin incomplete, localpref 100, valid, external
1111, (aggregated by 1111 1.1.1.4)/* IOS router */
194.68.128.3 from 194.68.128.3 (1.1.1.4)
Origin IGP, localpref 100, valid, external, atomic-aggregate, best
JUNOS
IOS
routing-options aggregateコマンドを使って (前出の例に示したポリシーの代わりに )、
atomic-aggregate ビットとその他の aggregate オプションを追加するためのデフォルトを追加する
ことができます。
[edit routing-options]
lunkan@lena# show
aggregate {
route 100.100.0.0/16 {
as-path {
origin igp;
atomic-aggregate;
aggregator 1111 1.1.1.2;
}
}
}
この例は、アグリゲーションの変更された値(Origin
igp, atomic-aggregate, aggregator AS,
および router-id )を示しています。
lunkan@lena# run show route 100.100/16 detail all
inet.0: 24 destinations, 24 routes (23 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both
100.100.0.0/16 (2 entries, 1 announced)
*Aggregate
Preference: 130
Next hop type: Reject
State: <Active Int Ext>
Age: 5d 1:28:22
Task: Aggregate
Announcement bits (3): 0-KRT 4-BGP.0.0.0.0+179
5-BGP_Sync_Any
AS path: I <Atomic>
Aggregator: 1111 1.1.1.2
Flags: Depth: 0
Active
Contributing Routes (2):
100.100.1.1/32
proto BGP
100.100.2.1/32
proto BGP
28
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
BGP
Preference: 170/-101
Source: 1.1.1.1
Nexthop: 2.2.2.20 via fxp0.0, selected
State: <Int Ext>
Inactive reason: Route Preference
Local AS: 1111 Peer AS: 1111
Age: 30:02
Metric2: 10
Task: BGP_1111.1.1.1.1+179
AS path: I <Atomic Originator>
Aggregator: 1111 1.1.1.4
Cluster list: 1.1.1.1
Originator ID: 1.1.1.4
BGP next hop: 1.1.1.4
Localpref: 100
Router ID: 1.1.1.1
100.100.1.1/32 (1 entry, 1 announced)
*BGP
Preference: 170/-101
Source: 1.1.1.1
Nexthop: 2.2.2.17 via fxp0.0, selected
State: <Active Int Ext>
Local AS: 1111 Peer AS: 1111
Age: 30:02
Metric: 0
Metric2: 20
Task: BGP_1111.1.1.1.1+179
Announcement bits (3): 0-KRT 3-Aggregate 5-BGP_Sync_Any
AS path: ? <Originator>
Cluster list: 1.1.1.1 1.1.1.3
Originator ID: 1.1.1.7
Communities: 1111:1
BGP next hop: 1.1.1.7
Localpref: 100
Router ID: 1.1.1.1
100.100.2.1/32 (1 entry, 1 announced)
*BGP
Preference: 170/-101
Source: 1.1.1.1
Nexthop: 2.2.2.17 via fxp0.0, selected
State: <Active Int Ext>
Local AS: 1111 Peer AS: 1111
Age: 30:02
Metric: 0
Metric2: 20
Task: BGP_1111.1.1.1.1+179
Announcement bits (3): 0-KRT 3-Aggregate 5-BGP_Sync_Any
AS path: ? <Originator>
Cluster list: 1.1.1.1 1.1.1.3
Originator ID: 1.1.1.7
Communities: 1111:2
BGP next hop: 1.1.1.7
Localpref: 100
Router ID: 1.1.1.1
[edit routing-options]
lunkan@lena#
Copyright © 2001, Juniper Networks, Inc.
29
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
以下は、その時点でJuniperルーターが優先され、アグリゲートルートに関して同じ値を持っている場合の出力です。
dummy#sh ip bgp
BGP table version is 8, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
*>
*>
*>
*>
*
*>
*
*>
*
*>
*
Network
3.3.0.0/16
10.0.0.0
33.33.0.0/16
100.100.0.0/16
100.200.0.0/16
111.111.0.0/16
222.222.0.0/16
Next Hop
0.0.0.0
0.0.0.0
0.0.0.0
194.68.128.2
194.68.128.3
194.68.128.2
194.68.128.3
194.68.128.2
194.68.128.3
194.68.128.2
194.68.128.3
Metric LocPrf Weight Path
0
32768 i
0
32768 i
0
32768 i
0 1111
0 1111
0 1111
0 1111
0 1111
0 1111
0 1111
0 1111
I/* JUNOS */
I/* IOS */
i
i
?
?
?
?
dummy#sh ip bgp 100.100.0.0
BGP routing table entry for 100.100.0.0/16, version 5
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Advertised to peer-groups:
external
1111, (aggregated by 1111 1.1.1.2)/* JUNOS */
194.68.128.2 from 194.68.128.2 (1.1.1.2)
Origin IGP, localpref 100, valid, external, atomic-aggregate, best
1111, (aggregated by 1111 1.1.1.4)/* IOS */
194.68.128.3 from 194.68.128.3 (1.1.1.4)
Origin IGP, localpref 100, valid, external, atomic-aggregate
この構造に加えられたいくつかの変更は、ASに入出力するパケットパスを構成する際の一般的なものです。外部ピア
は、別の境界ルーターのもう1つのパスより優先順位が低くなるように、該当するパスの先頭にas-pathを付加するこ
とができます。また、communityまたはMEDを使って、共通のポリシーをネゴシエートすることもできます。同様に、
外部の宛先へ転送される内部パケットのlocal-preferenceにより高い値をセットすることができます。
アグリゲーションに関して特に注意しなければならない点は、アドレッシング構造です。アグリゲートの条件付きアド
バタイズメントを実行する場合は、アグリゲート範囲にループバックが含まれないようにしなければなりません。そう
でないと、ループバックが常にアグリゲートルートに内包されるルートとなるため、アグリゲーションが無限に続き、
条件によって消失することもなくなってしまいます。ループバックは、この例に示すように、アグリゲート範囲外の境
界ルーター上の範囲に含まれるようにする必要があります。
30
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
この問題は、IOSの抑制機能と同様の方法で解決することもできます。以下の例に示すとおり、lo0はアグリゲート
1.1.1.0/24に関与するルートとは見なされません。
}
routing-options {
aggregate {
route 1.1.1.0/24 policy deny_local;
}
router-id 1.1.1.2;
autonomous-system 1111;
}
protocols {
bgp {
advertise-inactive;
log-updown;
group external {
type external;
description to_ebgp-routers;
local-address 194.68.128.2;
hold-time 180;
damping;
import ebgp_in;
family inet {
unicast {
prefix-limit {
maximum 100;
teardown 70;
}
}
any;
}
export ebgp;
peer-as 2222;
neighbor 194.68.128.33 {
peer-as 3333;
}
}
}
policy-options {
policy-statement deny_local {
term 1 {
from interface lo0.0;
then reject;
}
}
}
Copyright © 2001, Juniper Networks, Inc.
31
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
アグリゲートルートを検証します。1.1.1.2/32がアグリゲーションに関与していない点に注意してください。
lunkan@junos_lena# run show route 1.1.1.0 detail
inet.0: 27 destinations, 27 routes (25 active, 0 holddown, 2 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.0/24 (1 entry, 1 announced)
*Aggregate
Preference: 130
Next hop type: Reject
State: <Active Int Ext>
Age: 18:14:13
Task: Aggregate
Announcement bits (3): 0-KRT 4-BGP.0.0.0.0+179
5-BGP_Sync_Any
AS path: I
Flags: Depth: 0
Active
AS path list:
AS path: I Refcount: 7
Contributing Routes (7):
1.1.1.3/32
proto IS-IS
1.1.1.4/32
proto IS-IS
1.1.1.5/32
proto IS-IS
1.1.1.6/32
proto IS-IS
1.1.1.7/32
proto IS-IS
1.1.1.8/32
proto IS-IS
この例は、ローカル(direct)ルートを示しています。1.1.1.2/32が直接ルートです。
This example shows the local (direct) routes. Note 1.1.1.2/32 is a direct route.
lunkan@junos_lena# run show route protocol direct
inet.0: 27 destinations, 27 routes (25 active, 0 holddown, 2 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.2/32
2.2.2.16/28
194.68.128.0/24
32
*[Direct/0] 1w4d 20:09:21
> via lo0.0
*[Direct/0] 17:40:51
> via fxp0.0
*[Direct/0] 1d 06:24:04
> via fxp1.0
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
境界ルーター
境界ルーターは、EBGPとIBGPが出会う境界線を処理します。境界ルーターの数と配置場所は、IBGP構造と提供する
サービスによって決まります。
IBGPがルートリフレクタ構造の場合は、一般に、境界ルーターはバックボーンを取り巻くエッジに配置されます。コ
ンフェデレーションを使用している場合は、各サブASのポリシーを適用できるように、各サブASに境界ルーターを配
置することができます。
境界ルーターには、いくつかのタイプがあります。
■ サービスプロバイダが互いにピアリングするインターネット相互接続点
■ サービスプロバイダ間のプライベートピアリング
■ いくつかの境界機能を持つ各CPEルーター
■ EBGPなどのダイナミックルーティングプロトコルを使用している場合は、カスタマのルーターへのコネクション。
たとえば、レイヤ3 RFC 2547bis VPNや、終端ルーターをネットワークサービスを保護するための境界ルータ
ーにするカスタマエッジ-プロバイダエッジ間。
境界ルーターはさまざまな機能を管理します。
■ 入力/出力ルーティングポリシー
■ 入力/出力トラフィックフィルタリング
■ 外部隣接ルーターのリンクに入出力するトラフィックのカウントとアカウンティング
■ 特定のトラフィックのためのルーター/ネットワークの安全性の確保
■ redundancyの処理
■ 外部コネクションへのサービス提供
入力/出力ルーティングBGPポリシー
ルーティングポリシーは、潜在する多数の状況を処理することができます。それらは、ピアリングと as-path を使
用する場合のように、論理的または方策的に実行されます。
ポリシーを作成して、ASとの間でやり取りされるトラフィックが経由するパスに影響を与えたり、それらを操作した
りすることができます。
Communityが合致したら、as-pathを付加し、MEDをセットする
BGPは、ASトラフィックがASからのすべてのルートを経由するか、一部の特定のルートだけを経由するかを操作す
るために、ポリシーをルートに適用します。ルートをマークするために使用される主な機能は、communityです。起
点(アクセスルーター)などの特定のルートをマークすることで、境界/配信ルーターは、次のようにそのルートに関す
る決定事項を決めることができます。
■ よく知られた community
no-export を使うことで、外部隣接ルーターへの特定ルートの転送を阻止する
■ 境界ルーターでMEDと as-path を操作できるように、アクセスルーターで特定のルートに community をマ
ークする
■ アナウンスされたアグリゲートに対して境界ルーターで as-path と MED を操作し、ポリシーをASへの応答ト
ラフィックに適用する
Copyright © 2001, Juniper Networks, Inc.
33
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
図 10: Provision and Prevention of Advertising Intra-AS Routes
AS 1111
UNIX
Lunkan
192.168.1/24, no-export
172.16.2/24, 1111:10
M10
Lena
2.2/16
Pagent
Ida
AS 2222
M40
Access
100.100.1.1/32, 1111:1
100.100.2.1/32, 1111:2
100.200.1.1/32, 1111:5
100.200.2.1/32, 1111:4
111.111/16,
1111:5
222.222/16,
1111:6
M20
Cisco_pop
Cisco_border
Dummy
AS 3333
Cisco_core_rr
3.3/16
Plus Martians
192.168.1/24, no-export
図10と図11は、トポロジー例と、受信およびアドバタイズされたルート更新情報の例です。図10は、イントラASト
ラフィックを対象としたルートのプロビジョニング(たとえば、RFC 1918ルート。この場合は、192.168.1/24、
192.168.2/24、および172.16.2/24)と、適したルートテーブルプリフィックスを示しています。
図11は、ASへの応答トラフィックを制御するための、as-path と MED の操作を示しています。境界ルーターはア
グリゲーションを実行し、特定の community stringを持つルートの受信時に、アグリゲートされていないカスタ
マのプリフィックスへ送るなどのアクションを実行します。
34
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
図 11: Manipulation of Announced Aggregate Updates
AS 1111
UNIX
Lunkan
M10
100.100/16 MED 0
100.200/16 MED 100 as-path 1111 1111
111.111/16 MED 0
222.222/16 MED 100 as-path 1111 1111 1111
Ida
Lena
M20
Access
Pagent
M40
AS 2222
100.100.1.1/32, 1111:1
100.100.2.1/32, 1111:2
100.200.1.1/32, 1111:5
100.200.2.1/32, 1111:4
111.111/16,
1111:5
222.222/16,
1111:6
Cisco_pop
Cisco_border
Dummy
AS 3333
Cisco_core_rr
100.200/16 MED 0
100.100/16 MED 100 as-path 1111 1111 1111
111.111/16 MED 0
222.222/16 MED 100 as-path 1111 1111 1111
CommunityをBGPルートに追加するIOSの例
この例では、Cisco_core_rrが192.168.2/24 rfc1918ルートをアナウンスしています。ルートは、外部に転送さ
れないように、community
no-export でマークされています。以下は、Ciscoルーターのコンフィグレーショ
ンの一部です。
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.6
bgp cluster-id 3232236033
bgp log-neighbor-changes
network 192.168.2.0 route-map rfc1918
timers bgp 30 90
redistribute connected
neighbor internal_rr peer-group
neighbor
neighbor
neighbor
neighbor
neighbor
neighbor
neighbor
neighbor
neighbor
neighbor
neighbor
neighbor
internal_rr remote-as 1111
internal_rr update-source Loopback0
internal_rr route-reflector-client
internal_rr send-community
internal_rr route-map rfc1918 out
internal peer-group
internal remote-as 1111
internal update-source Loopback0
internal send-community/* Send community */
internal route-map rfc1918 out/* Route-map out */
1.1.1.1 peer-group internal
1.1.1.2 peer-group internal_rr
Copyright © 2001, Juniper Networks, Inc.
35
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
neighbor 1.1.1.3 peer-group internal_rr
neighbor 1.1.1.4 peer-group internal_rr
neighbor 1.1.1.5 peer-group internal_rr
no auto-summary
!
!
ip bgp-community new-format
!
!
access-list 1 permit 192.168.2.0 0.0.0.25
/* Access-list that route-map
use */
route-map rfc1918 permit 10/* Route-map mark route with no-export
community */
match ip address 1
set community no-export
!
この例では、Ciscoアクセスルーターが、後から境界ルーターが判別できるように、community タグを持つIBGP
へのルートをプロビジョンしています。
!
router bgp 1111
no synchronization
bgp log-neighbor-changes
timers bgp 30 90
redistribute connected route-map access/* Route-map used for connected
routes (loopbacks) */
redistribute static route-map static
/* Route-map used for static
routes */
neighbor access peer-group
neighbor access remote-as 1111
neighbor access update-source Loopback0
neighbor access send-community
neighbor 1.1.1.3 peer-group access
neighbor 1.1.1.5 peer-group access
no auto-summary
!
ip bgp-community new-format
!
access-list 1 permit 100.100.1.1/* Access-list that route-map uses */
access-list 2 permit 100.100.2.1
access-list 3 permit 100.200.1.1
access-list 4 permit 100.200.2.1
access-list 5 permit 111.111.0.0 0.0.255.255
access-list 6 permit 222.222.0.0 0.0.255.255
route-map access permit 10/* Route-map that sets community for
connected routes */
match ip address 1
set community 1111:1
!
route-map access permit 20
match ip address 2
set community 1111:2
!
route-map access permit 30
match ip address 3
set community 1111:3
!
36
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
route-map access permit 40
match ip address 4
set community 1111:4
!
route-map static permit 10/* Route-map that set community for staticly
routes */
match ip address 5
set community 1111:5
!
route-map static permit 20
match ip address 6
set community 1111:6
!
ここでは、Ciscoルーターは、アナウンスされたルートが community stringを持っていることを検証しています。
cisco_access#sh ip bgp commun 1111:1
BGP table version is 12, local router ID is 1.1.1.7
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
*> 100.100.1.1/32
Next Hop
0.0.0.0
Metric LocPrf Weight Path
0
32768 ?
cisco_access#sh ip bgp commun 1111:2
BGP table version is 12, local router ID is 1.1.1.7
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
*> 100.100.2.1/32
Next Hop
0.0.0.0
Metric LocPrf Weight Path
0
32768 ?
cisco_access#sh ip bgp commun 1111:3
BGP table version is 12, local router ID is 1.1.1.7
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
*> 100.200.1.1/32
Next Hop
0.0.0.0
Metric LocPrf Weight Path
0
32768 ?
cisco_access#sh ip bgp commun 1111:4
BGP table version is 12, local router ID is 1.1.1.7
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
*> 100.200.2.1/32
Next Hop
0.0.0.0
Metric LocPrf Weight Path
0
32768 ?
cisco_access#sh ip bgp commun 1111:5
BGP table version is 12, local router ID is 1.1.1.7
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
*> 111.111.0.0/16
Next Hop
0.0.0.0
Metric LocPrf Weight Path
0
32768 ?
cisco_access#sh ip bgp commun 1111:6
BGP table version is 12, local router ID is 1.1.1.7
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
*> 222.222.0.0/16
Copyright © 2001, Juniper Networks, Inc.
Next Hop
0.0.0.0
Metric LocPrf Weight Path
0
32768 ?
37
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
CommunityをBGPルートに追加するJUNOSソフトウェアの例
この例では、lunkanルーターが、community
community
no-export をマークした192.168.1/24
rfc1918ルートと、
1111:10をマークした172.16.2/24ルートをアナウンスし、前出のcisco_accessルーターと同様
のルートプロビジョニングをシミュレートしています。
routing-options {
router-id 1.1.1.1;
autonomous-system 1111;
}
protocols {
bgp {
traceoptions {
file bgp;
flag state;
}
log-updown;
group internal_rr {
type internal;
local-address 1.1.1.1;
export service;/* Export policy (for non-reflected routes) */
cluster 1.1.1.1;
neighbor 1.1.1.2 {
authentication-key "$9$.mT3ApBSrv9ApBRSMW";
}
neighbor 1.1.1.3 {
authentication-key "$9$h2PclM7-waZjX7-w2aiH";
}
neighbor 1.1.1.4;
neighbor 1.1.1.5;
}
group internal {
type internal;
local-address 1.1.1.1;
export service;/* Export policy (for non-reflected routes) */
neighbor 1.1.1.6;
}
}
policy-options {
policy-statement service {
term one {
from {
route-filter 192.168.1.0/24 exact;
}
then {
community add rfc1918;
accept;
}
}
term two {
from {
route-filter 172.16.2.0/24 exact;
}
then {
community add mcast;
accept;
}
}
}
community mcast members 1111:10;
community rfc1918 members no-export;
}
38
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
ここでは、Juniperルーターは、アナウンスされたルートが community stringを持つことを検証しています。
lunkan@lunkan# run show route advertising-protocol bgp 1.1.1.2 172.16.2/24 detail
inet.0: 27 destinations, 27 routes (27 active, 0 holddown, 0 hidden)
Prefix
Nexthop
MED
Lclpref AS path
172.16.2.0/24 (1 entry, 1 announced)
BGP group type Internal AS 1111
Nexthop: Self
Localpref: 100
AS path: I
Communities: 1111:10
[edit]
lunkan@lunkan# run show route advertising-protocol bgp 1.1.1.2 192.168.1/24 detail
inet.0: 27 destinations, 27 routes (27 active, 0 holddown, 0 hidden)
Prefix
Nexthop
MED
Lclpref AS path
192.168.1.0/24 (1 entry, 1 announced)
BGP group type Internal AS 1111
Nexthop: Self
Localpref: 100
AS path: I
Communities: no-export
[edit]
lunkan@lunkan#
IOSのas-pathとMEDの操作例
これは、ルートを受信するcisco_borderのコンフィグレーションの一部です。いくつかのルートをアグリゲートして
いますが、それ以外はアグリゲートしていません。場合によっては、MED を追加しています。as-path プリペンド
は、community stringに基づいて付加されます。また、デフォルトとして community
no-export を持つ
ルートはEBGPへはアドバタイズされません。
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.4
bgp log-neighbor-changes
bgp deterministic-med
bgp dampening route-map damp
aggregate-address 100.100.0.0 255.255.0.0 summary-only
aggregate-address 100.200.0.0 255.255.0.0 summary-only
timers bgp 30 90
neighbor internal peer-group
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor internal next-hop-self
neighbor external peer-group
neighbor external prefix-list martians in
neighbor external route-map int_policy in
neighbor external route-map ext_policy out /* Route-map (policy) applied
to route... */
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.6 peer-group internal
neighbor 194.68.128.22 remote-as 2222
neighbor 194.68.128.22 peer-group external
neighbor 194.68.128.33 remote-as 3333
neighbor 194.68.128.33 peer-group external
no auto-summary
!
ip bgp-community new-format
ip community-list 1 permit 1111:5
ip community-list 2 permit 1111:6
!
Copyright © 2001, Juniper Networks, Inc.
39
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
access-list 10 permit 100.100.0.0 0.0.255.255
access-list 20 permit 100.200.0.0 0.0.255.255
route-map ext_policy permit 10
match ip address 10 /* Agggregate 100.100/16 are as-prep and get high
(bad) MED */
set metric 100
set as-path prepend 1111 1111 1111
!
route-map ext_policy permit 20
match ip address 20/* Aggregate 100.200/16 get low (good) MED */
set metric 0
!
route-map ext_policy permit 30
match community 1
set metric 100
set as-path prepend 1111 1111 1111 /* 111.111/16 route with community
1111:5 get as-path prepend and
high MED (bad) value */
!
route-map ext_policy permit 40
match community 2 /* 222.222/16 route with community 1111:6 get low MED
(good) value */
set metric 0
!
route-map ext_policy deny 50
!
community がマークされたルートは、境界ルーターに到達します。
cisco_border#sh ip bgp comm 1111:1
BGP table version is 17, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
s>i100.100.1.1/32
1.1.1.7
0
100
0 ?
cisco_border#
cisco_border#sh ip bgp comm 1111:2
BGP table version is 17, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
s>i100.100.2.1/32
1.1.1.7
0
100
0 ?
cisco_border#
cisco_border#sh ip bgp comm 1111:3
BGP table version is 17, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
s>i100.200.1.1/32
1.1.1.7
0
100
0 ?
cisco_border#
cisco_border#sh ip bgp comm 1111:4
BGP table version is 17, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
s>i100.200.2.1/32
1.1.1.7
0
100
0 ?
cisco_border#
40
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
この例は、community string1111:10を持つルートを示しています。
cisco_border#sh ip bgp com 1111:10
BGP table version is 18, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
*>i172.16.2.0/24
1.1.1.1
100
0 i
cisco_border#
この例は、no-export
community
stringを持つルートを示しています。
cisco_border#sh ip bgp comm no-export
BGP table version is 19, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
*>i192.168.1.0
1.1.1.1
100
0 i
*>i192.168.2.0
1.1.1.6
0
100
0 i
* i
1.1.1.6
0
100
0 i
cisco_border#
この例は、community stringに応じて、MED と as-path が操作されているルートを示しています。
cisco_border#sh ip bgp comm 1111:5
BGP table version is 17, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
*>i111.111.0.0/16
1.1.1.7
0
100
0 ?
cisco_border#
cisco_border#sh ip bgp comm 1111:6
BGP table version is 17, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
*>i222.222.0.0/16
1.1.1.7
0
100
0 ?
cisco_border#
この例は、EBGP隣接ルーターへアドバタイズされたルートを示しています。192.168.1/24、192.168.2/24、
および172.16.2/24はアドバタイズされません。
cisco_border#sh ip bgp nei 194.68.128.33 adv
BGP table version is 17, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i -internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
*> 100.100.0.0/16
0.0.0.0
32768 i
*> 100.200.0.0/16
0.0.0.0
32768 i
*>i111.111.0.0/16
1.1.1.7
0
100
0 ?
*>i222.222.0.0/16
1.1.1.7
0
100
0 ?
cisco_border#
Copyright © 2001, Juniper Networks, Inc.
41
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
as-pathとMEDを操作するJUNOSソフトウェアの例
これは、前出のIOSの例と同じ結果をもたらすJuniper境界ルーターのコンフィグレーションです。
routing-options {
aggregate {
route 100.100.0.0/16 {
as-path {
origin igp;
atomic-aggregate;
aggregator 1111 1.1.1.2;
}
}
route 100.200.0.0/16 {
as-path {
origin igp;
atomic-aggregate;
aggregator 1111 1.1.1.2;
}
}
}
router-id 1.1.1.2;
autonomous-system 1111;
}
protocols {
bgp {
traceoptions {
file bgp;
flag damping detail;
}
log-updown;
group external {
type external;
local-address 194.68.128.2;
damping;
import ebgp_in;
export ebgp; /* Policy used for EBGP peering */
neighbor 194.68.128.22 {
peer-as 2222;
}
neighbor 194.68.128.33 {
peer-as 3333;
}
}
group internal {
type internal;
local-address 1.1.1.2;
export internal;
neighbor 1.1.1.1 {
authentication-key "$9$0UylORSvWxwYoevWx-waJ";
}
neighbor 1.1.1.6;
}
}
policy-options {
policy-statement ebgp {
term two {/* Agggregate 100.200/16 are as-prep and get
high (bad) MED */
from {
route-filter 100.200.0.0/16 exact;
}
then {
metric 100;
as-path-prepend "1111 1111";
accept;
}
}
42
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
term three {/* Aggregate 100.100/16 get low (good) MED */
from {
route-filter 100.100.0.0/16 exact;
}
then {
metric 0;
accept;
}
}
term four {/* 222.222/16 route with community 1111:5 get as-path
prepend and high MED (bad) value */
from community bad;
then {
metric 100;
as-path-prepend "1111 1111 1111";
accept;
}
}
term five {/* 111.111/16 route with community 1111:6 get low MED
(good) value */
from community good;
then {
metric 0;
accept;
}
}
term last {
then reject;
}
}
community bad members 1111:6;
community good members 1111:5;
Copyright © 2001, Juniper Networks, Inc.
43
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
community がマークされたルートは、境界ルーターに到達します。
lunkan@lena> show route community 1111:1
inet.0: 28 destinations, 28 routes (26 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
100.100.1.1/32
*[BGP/170] 01:55:38, MED 0, localpref 100, from 1.1.1.1
AS path: ?
> to 1.1.0.3 via fxp0.0
to 1.1.0.5 via fxp0.0
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
lunkan@lena> show route community 1111:2
inet.0: 28 destinations, 28 routes (26 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
100.100.2.1/32
*[BGP/170] 01:55:41, MED 0, localpref 100, from 1.1.1.1
AS path: ?
to 1.1.0.3 via fxp0.0
> to 1.1.0.5 via fxp0.0
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
lunkan@lena> show route community 1111:3
inet.0: 28 destinations, 28 routes (26 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
100.200.1.1/32
*[BGP/170] 01:55:43, MED 0, localpref 100, from 1.1.1.1
AS path: ?
> to 1.1.0.3 via fxp0.0
to 1.1.0.5 via fxp0.0
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
lunkan@lena> show route community 1111:4
inet.0: 28 destinations, 28 routes (26 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
100.200.2.1/32
*[BGP/170] 01:55:45, MED 0, localpref 100, from 1.1.1.1
AS path: ?
> to 1.1.0.3 via fxp0.0
to 1.1.0.5 via fxp0.0
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
この例は、community string1111:10を持つルートを示しています。
lunkan@lena> show route community 1111:10
inet.0: 28 destinations, 28 routes (26 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
172.16.2.0/24
*[BGP/170] 00:22:42, localpref 100, from 1.1.1.1
AS path: I
> to 1.1.0.1 via fxp0.0
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
44
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
この例は、lunkanルーターとcisco_borderルーターからの、no-export community stringを持つルートを示してい
ます。
lunkan@lena> show route community no-export
inet.0: 28 destinations, 28 routes (26 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
192.168.1.0/24
*[BGP/170] 02:03:04, localpref 100, from 1.1.1.1
AS path: I
> to 1.1.0.1 via fxp0.0
192.168.2.0/24
*[BGP/170] 02:03:07, MED 0, localpref 100, from
1.1.1.6
AS path: I
> to 1.1.0.6 via fxp0.0
[BGP/170] 02:03:04, MED 0, localpref 100, from
1.1.1.1
AS path: I
> to 1.1.0.6 via fxp0.0
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
この例は、community stringに応じて、MED と as-path が操作されているルートを示しています。
lunkan@lena> show route community 1111:5 detail
inet.0: 28 destinations, 28 routes (26 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
111.111.0.0/16 (1 entry, 1 announced)
*BGP
Preference: 170/-101
Source: 1.1.1.1
Nexthop: 1.1.0.3 via fxp0.0
Nexthop: 1.1.0.5 via fxp0.0, selected
State: <Active Int Ext>
Local AS: 1111 Peer AS: 1111
Age: 1:59:26
Metric: 0
Metric2: 20
Task: BGP_1111.1.1.1.1+179
Announcement bits (3): 0-KRT 4-BGP.0.0.0.0+179
5-BGP_Sync_Any
AS path: ? <Originator>
Cluster list: 1.1.1.1 1.1.1.5
Originator ID: 1.1.1.7
Communities: 1111:5
BGP next hop: 1.1.1.7
Localpref: 100
Router ID: 1.1.1.1
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
lunkan@lena> show route community 1111:6 detail
inet.0: 28 destinations, 28 routes (26 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both
222.222.0.0/16 (1 entry, 1 announced)
*BGP
Preference: 170/-101
Source: 1.1.1.1
Nexthop: 1.1.0.3 via fxp0.0, selected
Nexthop: 1.1.0.5 via fxp0.0
State: <Active Int Ext>
Local AS: 1111 Peer AS: 1111
Age: 1:59:33
Metric: 0
Metric2: 20
Task: BGP_1111.1.1.1.1+179
Announcement bits (3): 0-KRT 4-BGP.0.0.0.0+179
5-BGP_Sync_Any
Copyright © 2001, Juniper Networks, Inc.
45
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
AS path: ? <Originator>
Cluster list: 1.1.1.1 1.1.1.5
Originator ID: 1.1.1.7
Communities: 1111:6
BGP next hop: 1.1.1.7
Localpref: 100
Router ID: 1.1.1.1
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
この例は、EBGP隣接ルーターにアドバタイズされるルートを示しています。192.168.1/24、192.168.2/24、
および172.16.2/24はアドバタイズされない点に注意してください。
lunkan@lena> show route advertising-protocol bgp 194.68.128.33
inet.0: 28 destinations, 28 routes (25 active, 0 holddown, 7 hidden)
Prefix
Nexthop
MED
Lclpref AS path
100.100.0.0/16
Self
0
I
100.200.0.0/16
Self
100
1111 1111 [1111]
I
111.111.0.0/16
Self
0
?
222.222.0.0/16
Self
100
1111 1111 1111
[1111] ?
lunkan@lena>
Pagentの出力例
この例は、pagent (外部ASサービスプロバイダルーター)とそのBGPテーブルからの出力を示しています。
MED と as-path が境界ルーターからのルートに付加されている点に注意してください。
pagent#sh ip bgp
BGP table version is 13, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best,
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
*> 0.0.0.0
194.68.128.33
1
0 3333
*> 2.2.0.0/16
0.0.0.0
0
32768 i
*> 3.3.0.0/16
194.68.128.33
1
0 3333
*> 10.0.0.0
194.68.128.33
1
0 3333
*> 100.100.0.0/16
194.68.128.2
0
0 1111
*
194.68.128.3
100
0 1111
1111 i
*
194.68.128.2
0 3333
*> 100.200.0.0/16
194.68.128.3
0
0 1111
*
194.68.128.2
100
0 1111
*
194.68.128.3
0 3333
*> 111.111.0.0/16
194.68.128.2
0
0 1111
*
194.68.128.3
100
0 1111
1111 ?
*
194.68.128.2
0 3333
*> 222.222.0.0/16
194.68.128.3
0
0 1111
*
194.68.128.2
100
0 1111
1111 ?
*
194.68.128.3
0 3333
pagent#
46
i -internal
i
i
?
i
1111 1111
1111
i
1111
1111
?
1111
i
1111 i
i
1111
1111 ?
?
1111 1111
1111 ?
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
フォワーディングテーブルは、as-path と MED が正常に処理された適切な結果を示しています。
pagent#sh ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS
inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
最後に使用されるゲートウェイは、ネットワーク0.0.0.0へ至る194.68.128.33です。
2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
2.2.0.0/16 is directly connected, Null0
2.2.2.2/32 is directly connected, Loopback0
100.0.0.0/16 is subnetted, 2 subnets
B
100.100.0.0 [20/0] via 194.68.128.2, 00:21:51/* JUNOS */
B
100.200.0.0 [20/0] via 194.68.128.3, 00:21:37/* IOS */
3.0.0.0/16 is subnetted, 1 subnets
B
3.3.0.0 [20/1] via 194.68.128.33, 00:21:56
C
194.68.128.0/24 is directly connected, Ethernet0
111.0.0.0/16 is subnetted, 1 subnets
B
111.111.0.0 [20/0] via 194.68.128.2, 00:21:53/* JUNOS */
B
10.0.0.0/8 [20/1] via 194.68.128.33, 00:21:57
B*
0.0.0.0/0 [20/1] via 194.68.128.33, 00:21:58
B
222.222.0.0/16 [20/0] via 194.68.128.3, 00:21:39/* IOS */
pagent#
S
C
Copyright © 2001, Juniper Networks, Inc.
47
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
as-pathを使ったlocal-preferenceの操作
この例の目的は、隣接ASから1ホップ離れたホップ(3333または2222のどちらか)から発信されたルートを識別し、
これらのルートの local-preference に高い値をセットすることです。つまり、ASから特定の境界ルーターを
経て外部ピアへ至るトラフィックを制御することができます。図12は、ASから出力されたトラフィックのパスを制御
するポリシーを示しています。
図 12: Controlling Traffic Out from an AS
AS 1111
UNIX
Lunkan
M10
2.2/16, Local-pref 101
3.3/16, Local-pref 100
Lena
2.2/16, as-path 2222
Pagent
Ida
AS 2222
M40
Access
M20
Cisco_pop
3.3/16, Local pref 101
2.2/16. Local pref 100
Cisco_border
Dummy
AS 3333
Cisco_core_rr
48
3.3/16, as-path 3333
Plus Martians
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
as-pathをフィルタし、local-preferenceを操作するIOSの例
この例は、1ホップ離れたAS 3333から受信したルートをフィルタし、これらのルートの local-preference
をデフォルトの100より大きい101に定義するIOSコンフィグレーションを示しています。BGPネクストホップは、
境界ルーターlo0として定義されています。
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.4
bgp log-neighbor-changes
bgp deterministic-med
bgp dampening route-map damp
aggregate-address 100.100.0.0 255.255.0.0 summary-only
aggregate-address 100.200.0.0 255.255.0.0 summary-only
timers bgp 30 90
neighbor internal peer-group/* Internal peer grp */
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor internal next-hop-self/* Source-address for BGP next hop is
router lo0 */
neighbor external peer-group/* external peer grp */
neighbor external soft-reconfiguration inbound
neighbor external prefix-list martians in
neighbor external route-map int_policy in /* Route-map applied for
receiving updates */
neighbor external route-map ext_policy out
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.6 peer-group internal
neighbor 194.68.128.22 remote-as 2222
neighbor 194.68.128.22 peer-group external
neighbor 194.68.128.33 remote-as 3333
neighbor 194.68.128.33 peer-group external
no auto-summary
!
ip as-path access-list 1 permit ^3333$ /* as-path used (routes originate
in AS 3333 one hop away) */
!
!
route-map int_policy permit 10
match as-path 1
set local-preference 101/* Local-preference for routes from as-path
defined above */
!
route-map int_policy permit 20
!
この例は、as-path 正規表現がAS 3333 (1ホップ離れた)から発信されるルートを選択し、IBGP内でルートの
local-preference が101に定義されることを検証しています。
cisco_border#sh ip bgp reg ^3333$
BGP table version is 25, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
*> 3.3.0.0/16
194.68.128.33
1
101
0 3333 i
cisco_border#
Copyright © 2001, Juniper Networks, Inc.
49
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
as-pathをフィルタし、local-preferenceを操作するJUNOSソフトウェアの例
この例は、1ホップ離れたAS 3333から受信したルートをフィルタし、これらのルートの local-preference
をデフォルトの100より大きい101に定義するJUNOSコンフィグレーションを示しています。BGPネクストホップ
は、境界ルーターlo0として定義されています。
routing-options {
aggregate {
route 100.100.0.0/16 {
as-path {
origin igp;
atomic-aggregate;
aggregator 1111 1.1.1.2;
}
}
route 100.200.0.0/16 {
as-path {
origin igp;
atomic-aggregate;
aggregator 1111 1.1.1.2;
}
}
}
router-id 1.1.1.2;
autonomous-system 1111;
}
protocols {
bgp {
traceoptions {
file bgp;
flag route receive;
flag damping;
flag state;
}
group external {/* External peer grp */
type external;
local-address 194.68.128.2;
damping;
import ebgp_in;/* Policy applied to incoming route updates */
family inet {
unicast {
prefix-limit {
maximum 100;
teardown 70;
}
}
}
export ebgp;
neighbor 194.68.128.22 {
peer-as 2222;
}
neighbor 194.68.128.33 {
peer-as 3333;
}
}
group internal {/* Internal peer grp */
type internal;
local-address 1.1.1.2;
export internal;/* Policy applied to advertised updates */
neighbor 1.1.1.1 {
authentication-key "$9$4ToGiP5FApB.P5F6A1I";
}
neighbor 1.1.1.6;
}
}
policy-options {
policy-statement internal {
term one {
then {
next-hop self;/* Source-address for BGP next hop is
router lo0 */
50
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
}
}
}
policy-statement ebgp_in {
term 1918 {
from {
route-filter 0.0.0.0/0 exact;
route-filter 10.0.0.0/8 orlonger;
route-filter 127.0.0.0/8 orlonger;
route-filter 192.168.0.0/16 orlonger;
}
then reject;
}
term local_pref {
from as-path from_pagent;
then {
local-preference 101;/* Local-precedence for routes from
as-path defined below */
}
}
term no_damp {
from {
route-filter 198.41.0.0/24 exact;
route-filter 128.9.0.0/16 exact;
route-filter 192.33.4.0/24 exact;
route-filter 128.8.0.0/16 exact;
route-filter 192.203.230.0/24 exact;
route-filter 192.5.4.0/23 exact;
route-filter 128.63.0.0/16 exact;
route-filter 192.36.148.0/24 exact;
route-filter 193.0.14.0/24 exact;
route-filter 198.32.64.0/24 exact;
route-filter 202.12.27.0/24 exact;
}
then {
damping no;
accept;
}
}
term damp {
then damping yes;
}
}
as-path from_pagent 2222;/* as-path used (routes originate in AS 2222
one hop away) */
damping no {
disable;
}
damping yes {
half-life 15;
reuse 750;
suppress 2000;
max-suppress 60;
}
}
Copyright © 2001, Juniper Networks, Inc.
51
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
この例は、as-path正規表現がAS 2222 (1ホップ離れている)から発信されるルートを選択し、IBGP内でそのルー
トの local-preference が101に定義されることを検証します。
lunkan@lena# run show route aspath-regex "2222" detail
inet.0: 23 destinations, 23 routes (23 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2.2.0.0/16 (2 entries, 1 announced)
*BGP
Preference: 170/-102
Nexthop: 194.68.128.22 via fxp1.0, selected
State: <Active Ext>
Local AS: 1111 Peer AS: 2222
Age: 56 Metric: 0
Task: BGP_2222.194.68.128.22+179
Announcement bits (3): 0-KRT 4-BGP.0.0.0.0+179
5-BGP_Sync_Any
AS path: 2222 I
Localpref: 101
Router ID: 2.2.2.2
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
コンフィグレーションの動作を実証する
この例は、特定プリフィックスの local-preference が、3.3/16と2.2/16へのルートのルート優先順位を制
御することを検証しています。ルート3.3/16はBGPネクストホップとして1.1.1.4 (cisco_borderルーター)を持ち、
ルート2.2/16はBGPネクストホップとして1.1.1.2 (lenaルーター)を持っているはずです。
ルートリフレクタは、宛先への最適ルートだけ(複数ではない)を返します。この例では、コアルートリフレクタのlena
(JUNOSソフトウェア)とcisco_core_rr (IOS)が、3.3/16および2.2/16プリフィックスに関するポリシーに従って、
最適ルートをPOPルーターへ返すかどうかも検証しています。ルートのBGPネクストホップと as-path が正しく
出力されている点に注意してください。
lunkan@lunkan> show route 2.2.0.0 all detail
inet.0: 25 destinations, 25 routes (25 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2.2.0.0/16 (1 entry, 1 announced)
*BGP
Preference: 170/-102
Source: 1.1.1.2
Nexthop: 1.1.0.2 via fxp0.0, selected
State: <Active Int Ext>
Local AS: 1111 Peer AS: 1111
Age: 5:25
Metric: 0
Metric2: 10
Task: BGP_1111.1.1.1.2+179
Announcement bits (3): 0-KRT 3-BGP.0.0.0.0+179
4-BGP_Sync_Any
AS path: 2222 I
BGP next hop: 1.1.1.2
Localpref: 101
Router ID: 1.1.1.2
lunkan@lunkan> show route 3.3.0.0 all detail
inet.0: 25 destinations, 25 routes (25 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
52
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
3.3.0.0/16 (1 entry, 1 announced)
*BGP
Preference: 170/-102
Source: 1.1.1.4
Nexthop: 1.1.0.4 via fxp0.0, selected
State: <Active Int Ext>
Local AS: 1111 Peer AS: 1111
Age: 38:34
Metric: 1
Metric2: 10
Task: BGP_1111.1.1.1.4+11029
Announcement bits (3): 0-KRT 3-BGP.0.0.0.0+179
4-BGP_Sync_Any
AS path: 3333 I
BGP next hop: 1.1.1.4
Localpref: 101
Router ID: 1.1.1.4
lunkan@lunkan>
cisco_core_rr#sh ip rout 2.2.0.0
Routing entry for 2.2.0.0/16
Known via "bgp 1111", distance 200, metric 0
Tag 2222, type internal
Last update from 1.1.1.2 00:06:56 ago
Routing Descriptor Blocks:
* 1.1.1.2, from 1.1.1.2, 00:06:56 ago
Route metric is 0, traffic share count is 1
AS Hops 1
cisco_core_rr#sh ip rout 3.3.0.0
Routing entry for 3.3.0.0/16
Known via "bgp 1111", distance 200, metric 1
Tag 3333, type internal
Last update from 1.1.1.4 00:39:58 ago
Routing Descriptor Blocks:
* 1.1.1.4, from 1.1.1.4, 00:39:58 ago
Route metric is 1, traffic share count is 1
AS Hops 1
cisco_core_rr#
アクセスルーターが動作している点に注意してください(lenaの場合は2.2/16、cisco_borderの場合は3.3/16)。
cisco_access#sh ip ro 2.2.0.0
Routing entry for 2.2.0.0/16
Known via "bgp 1111", distance 200, metric 0
Tag 2222, type internal
Last update from 1.1.1.2 00:02:40 ago
Routing Descriptor Blocks:
* 1.1.1.2, from 1.1.1.3, 00:02:40 ago
Route metric is 0, traffic share count is 1
AS Hops 1
cisco_access#sh ip ro 3.3.0.0
Routing entry for 3.3.0.0/16
Known via "bgp 1111", distance 200, metric 1
Tag 3333, type internal
Last update from 1.1.1.4 00:35:47 ago
Routing Descriptor Blocks:
* 1.1.1.4, from 1.1.1.3, 00:35:47 ago
Route metric is 1, traffic share count is 1
AS Hops 1
Copyright © 2001, Juniper Networks, Inc.
53
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
BGPテーブルの出力は、ルートに関するより多くのデータを示しています。これを元に、名前付きプリフィックスへ
のトラフィックが予定したプライマリパスを経由していることを確認することができます。
cisco_access#sh ip bgp 2.2.0.0
BGP routing table entry for 2.2.0.0/16, version 71
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
2222
1.1.1.2 (metric 20) from 1.1.1.3 (1.1.1.2)
Origin IGP, metric 0, localpref 101, valid, internal, best
Originator: 1.1.1.2, Cluster list: 1.1.1.5, 1.1.1.1
cisco_access#sh ip bgp 3.3.0.0
BGP routing table entry for 3.3.0.0/16, version 61
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
3333
1.1.1.4 (metric 20) from 1.1.1.3 (1.1.1.4)
Origin IGP, metric 1, localpref 101, valid, internal, best
Originator: 1.1.1.4, Cluster list: 1.1.1.5, 1.1.1.1
cisco_access#
Martianプリフィックスフィルタ
Martianフィルタは、RFC 1918アドレスブロックが受け入れられ、ルーティングされるのを阻止します。同様に、
ルーティングポリシーは、他のアドレスやプリフィックス長を制限することができます。たとえば、/22ビットより長
いマスクを持つルートを拒否することができます。また、/24より長いマスクを持つルートは受け入れるが、/32のホ
ストルートは拒否するといったことも指定できます。
以下は、Martianフィルタが隣接ピアからのルートを拒否する場合の例です、
IOS Martianプリフィックスフィルタの例
このIOSの例は、12.0未満のバージョンのものです。
!
router bgp 64512
neighbor peer-group gix
neighbor gix distribute-list 100 in
...
!
ip access-list 100 deny ip host 0.0.0.0 any
ip access-list 100 deny ip 127.0.0.0 0.255.255.255.255 255.0.0.0
0.255.255.255
ip access-list 100 deny ip 10.0.0.0 0.255.255.255 255.0.0.0 0.255.255.255
ip access-list 100 deny ip 172.16.0.0 0.15.255.255 255.240.0.0
0.15.255.255
ip access-list 100 deny ip 192.168.0.0 0.0.255.255 255.255.0.0
0.0.255.255
ip access-list 100 permit ip any any
!
54
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
IOSバージョン12.0以上では、パフォーマンスを向上させる目的でルート/プリフィックスフィルタを使用する際に
Cisco社が推奨しているプリフィックスフィルタを構成することができます。
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.4
bgp log-neighbor-changes
bgp deterministic-med
bgp dampening route-map damp
aggregate-address 100.100.0.0 255.255.0.0 summary-only
aggregate-address 100.200.0.0 255.255.0.0 summary-only
timers bgp 30 90
neighbor internal peer-group
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor internal next-hop-self
neighbor external peer-group
neighbor external prefix-list martians in
neighbor external route-map int_policy in
neighbor external route-map ext_policy out
neighbor external soft-reconfiguration inbound
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.6 peer-group internal
neighbor 194.68.128.22 remote-as 2222
neighbor 194.68.128.22 peer-group external
neighbor 194.68.128.33 remote-as 3333
neighbor 194.68.128.33 peer-group external
no auto-summary
!
!
ip prefix-list martians seq 10 deny 0.0.0.0/32
ip prefix-list martians seq 20 deny 127.0.0.0/8 le 32
ip prefix-list martians seq 30 deny 10.0.0.0/8 le 32
ip prefix-list martians seq 40 deny 172.16.0.0/12 le 32
ip prefix-list martians seq 50 deny 192.168.0.0/16 le 32
以下は、受信されたルートです。0/0と10/8が存在している点に注意してください。
cisco_border#sh ip bgp nei 194.68.128.33 rec
BGP table version is 19, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
* 0.0.0.0
194.68.128.33
* 2.2.0.0/16
194.68.128.22
* 3.3.0.0/16
194.68.128.33
* 10.0.0.0
194.68.128.33
Total number of prefixes 4
Copyright © 2001, Juniper Networks, Inc.
Metric LocPrf Weight Path
1
0 3333 i
1
0 3333 2222 i
1
0 3333 i
1
0 3333 ?
55
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
以下のルートは、BGPテーブル内に存在しています(0/0と10/8が存在していない点に注意してください)。
cisco_border#sh ip bgp
BGP table version is 19, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
Metric LocPrf Weight Path
*>i2.2.0.0/16
1.1.1.2
0
101
0 2222 i
*>i3.3.0.0/16
1.1.1.2
1
100
0 3333 i
*> 100.100.0.0/16
0.0.0.0
32768 i
s>i100.100.1.1/32
1.1.1.7
0
100
0 ?
s>i100.100.2.1/32
1.1.1.7
0
100
0 ?
*> 100.200.0.0/16
0.0.0.0
32768 i
s>i100.200.1.1/32
1.1.1.7
0
100
0 ?
s>i100.200.2.1/32
1.1.1.7
0
100
0 ?
*>i111.111.0.0/16
1.1.1.7
0
100
0 ?
*>i192.168.1.0
1.1.1.1
100
0 i
*>i192.168.2.0
1.1.1.6
0
100
0 i
* i
1.1.1.6
0
100
0 i
*>i222.222.0.0/16
1.1.1.7
0
100
0 ?
cisco_border#
56
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
JUNOS Martianプリフィックスフィルタの例
routing-options {
aggregate {
route 100.100.0.0/16;
}
router-id 1.1.1.2;
autonomous-system 1111;
}
protocols {
bgp {
traceoptions {
file bgp;
flag damping detail;
}
log-updown;
group external {
type external;
local-address 194.68.128.2;
damping;
import ebgp_in;
export ebgp;
neighbor 194.68.128.22 {
peer-as 2222;
}
neighbor 194.68.128.33 {
peer-as 3333;
}
}
group internal {
type internal;
local-address 1.1.1.2;
export internal;
neighbor 1.1.1.1 {
authentication-key "$9$0UylORSvWxwYoevWx-waJ";
}
neighbor 1.1.1.6;
}
}
policy-options {
policy-statement ebgp_in
term 1918 {
from {
route-filter
route-filter
route-filter
route-filter
}
then reject;
}
Copyright © 2001, Juniper Networks, Inc.
{
0.0.0.0/0 exact;
10.0.0.0/8 orlonger;
127.0.0.0/8 orlonger;
192.168.0.0/16 orlonger;
57
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
受信されるルートは、次のとおりです。
lunkan@lena# run show route receive-protocol bgp 194.68.128.33
inet.0: 27 destinations, 27 routes (25 active, 0 holddown, 4 hidden)
Prefix
Nexthop
MED
Lclpref AS path
2.2.0.0/16
194.68.128.22
1
3333 2222 I
3.3.0.0/16
194.68.128.33
1
3333 I
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
Prefix
Nexthop
MED
Lclpref AS path
0/0および10/8ルートはもはや存在していません。隣接ルーターは、4つのルートを受信します。
lunkan@lena# run show bgp summary
Groups: 3
Peers: 4 Down Peers: 0
Table
Tot Paths Act Paths Suppressed
inet.0
19
11
0
inet.2
0
0
0
Peer
194.68.128.22
194.68.128.33
1.1.1.1
1.1.1.6
AS
2222
3333
1111
1111
InPkt
198
389
385
375
History Damp State
0
0
0
0
Pending
0
0
OutPkt OutQ Flaps Last Up/Dwn State|#Act/Rcvd/Damp
196
0
0 01:34:33 1/4/0
0/0/0
381
0
0 03:07:58 1/4/0
0/0/0
380
0
0 03:07:43 8/10/0
0/0/0
378
0
0 03:06:43 1/1/0
0/0/0
受信されたインアクティブ(拒否された)ルートは、0/0と10/8です。
lunkan@lena# run show route receive-protocol bgp 194.68.128.33 inactive
inet.0: 27 destinations, 27 routes (25 active, 0 holddown, 4 hidden)
Prefix
Nexthop
MED
Lclpref AS path
0.0.0.0/0
194.68.128.33
1
3333 I
10.0.0.0/8
194.68.128.33
1
3333 ?
58
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
JUNOSポリシーの実装
一般に、複数のポリシーが必要となります。JUNOSソフトウェアでは、数通りの方法でポリシーを実装することがで
きます。
ポリシーの評価順序
BGPインポート/エクスポートポリシーは、プロセス全体、各グループ、または各隣接ルーターに適用することができ
ます。また、複数のポリシーを適用し、それらの実行と構文内の他のポリシーとの相互作用を制御することができます。
protocols {
bgp {
path-selection always-compare-med;
traceoptions {
file bgp;
flag route;
flag damping;
flag state;
}
log-updown;
group external {
type external;
local-address 194.68.128.2;
damping;
import [ (!test1 && test2) martians || ebgp_in) ];
family inet {
unicast {
prefix-limit {
maximum 100;
teardown 70;
}
}
}
export ebgp;
multipath;
neighbor 194.68.128.22 {
import [ special_policy ];
neighbor 194.68.128.33 {
peer-as 3333;
}
}
上記のシーケンスには、ピアグループexternalのインポートポリシーと、ピア194.68.128.33の個々のポリシー
special_policyが含まれています。以下は、インポートポリシーのシーケンスです。
import [ (test1 && test2) martians || ebgp_in) ];
上記の正規表現は、test1 が最初に評価されることを意味しています。合致した場合は、test2 が評価され、合致
しない場合は次のポリシーへ移動します。その後、Martianまたは ebgp_in ポリシーが適用されます。
Copyright © 2001, Juniper Networks, Inc.
59
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
1つのポリシー内のポリシー
1つのポリシーの中で、termごとに別のポリシーを呼び出すことができます。これによって、コードを繰り返し使用
したり、関数やtermを何度も使用したりする手間を省くことができます。関数やtermを何度も使用する大きなサイズ
のコンフィグレーション(たとえば、ルートフィルタ)の場合は、1つのポリシー内で別のポリシーを適用すると非常に
実用的です。
policy-options {
policy-statement ebgp_in {
term 1918 {
from {
route-filter 0.0.0.0/0 exact;
route-filter 10.0.0.0/8 orlonger;
route-filter 127.0.0.0/8 orlonger;
route-filter 192.168.0.0/16 orlonger;
}
then reject;
}
term local_pref {
from as-path from_pagent;
then {
local-preference 101;
}
}
term no_damp {
from policy root_dns;
then {
damping no;
accept;
}
}
term damp {
then damping yes;
}
}
policy-statement root_dns {
term dns {
from {
route-filter 198.41.0.0/24 exact;
route-filter 128.9.0.0/16 exact;
route-filter 192.33.4.0/24 exact;
route-filter 128.8.0.0/16 exact;
route-filter 192.203.230.0/24 exact;
route-filter 192.5.4.0/23 exact;
route-filter 192.112.36.0/24 exact;
route-filter 128.63.0.0/16 exact;
route-filter 192.36.148.0/24 exact;
route-filter 193.0.14.0/24 exact;
route-filter 198.32.64.0/24 exact;
route-filter 202.12.27.0/24 exact;
}
then accept;
}
}
}
60
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
シーケンス内に多数のtermを持つポリシー
アクションやスクリプトを順番に処理するポリシーを作成することもできます。この文書に記載されているすべてのポ
リシーは、この構造に準じています。このように実装している主な理由は、その方が、アクションの順番やポリシーの
流れを説明し易いからです。
BGPの安定性に関連する機能
ここでは、ダンピング(damping)や受信する最大プリフィックスの制限といった、BGPの安定性に関連する機能を説
明します。
ダンピング
ルートテーブルとピアの安定性を保証するために(つまり、エクスポートされるRIBが再計算され、状態が変化してしま
うのを回避するために)、インターネットコミュニティは、いくつかの標準機能を開発しました。その一例がダンピン
グ (RFC 2439)です。ダンピングを用いると、頻繁なルートフラッピングに起因するRIBの再計算とそれによるピア
の状態変化を避けることができます。ダンピングは、ルートが繰り返しフラッピングする場合に、一旦それが削除され、
まもなくしてからそれを元に戻るように保証します。ダンプされたルートは、ユーザが設定した時間の間、非アクティ
ブな状態になります。この抑制状態の間、ルーターは抑制されたルートを隣接ルーターにアドバタイズしません。その
結果、安定性が維持されます。ルートフラッピングが頻繁なほど、抑制時間は長くなります。
注
ダンピングはEBGPのみに効力を持ち、IBGP (as-path がヌル)は対象外です。
ただし、コンフェデレーションの境界にダンピングを提供することができます。
IOSダンピングコンフィグレーションの例
以下の例は、RIPEに基づくCiscoルーターのダンピングコンフィグレーションの一部です。
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.4
bgp log-neighbor-changes
bgp deterministic-med
bgp dampening route-map damp
aggregate-address 100.100.0.0 255.255.0.0 summary-only
aggregate-address 100.200.0.0 255.255.0.0 summary-only
timers bgp 30 90
neighbor internal peer-group
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor internal next-hop-self
neighbor internal soft-reconfiguration inbound
neighbor external peer-group
neighbor external prefix-list martians in
neighbor external route-map int_policy in
neighbor external route-map ext_policy out
neighbor external soft-reconfiguration inbound
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.6 peer-group internal
neighbor 194.68.128.22 remote-as 2222
neighbor 194.68.128.22 peer-group external
neighbor 194.68.128.33 remote-as 3333
Copyright © 2001, Juniper Networks, Inc.
61
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
neighbor 194.68.128.33 peer-group external
no auto-summary
!
!
ip as-path access-list 10 permit ^$
!
!
ip
ip
ip
ip
ip
ip
ip
ip
ip
ip
ip
ip
prefix-list
prefix-list
prefix-list
prefix-list
prefix-list
prefix-list
prefix-list
prefix-list
prefix-list
prefix-list
prefix-list
prefix-list
root_dns
root_dns
root_dns
root_dns
root_dns
root_dns
root_dns
root_dns
root_dns
root_dns
root_dns
root_dns
seq
seq
seq
seq
seq
seq
seq
seq
seq
seq
seq
seq
1 permit 198.41.0.0/24
2 permit 128.9.0.0/16
3 permit 192.33.4.0/24
4 permit 128.8.0.0/16
5 permit 192.203.230.0/24
6 permit 192.5.4.0/23
7 permit 192.112.36.0/24
8 permit 128.63.0.0/16
9 permit 192.36.148.0/24
10 permit 193.0.14.0/24
11 permit 198.32.64.0/24
12 permit 202.12.27.0/24
route-map damp deny 1
match as-path 10
!
route-map damp deny 2
match ip address prefix-list root_dns
!
route-map damp permit 3
set dampening 15 750 2000 60
!
この例は、ダンプジェネレータから100のプリフィックスを学習したCisco BGPテーブルを示しています。
cisco_border#sh ip bgp sum
BGP router identifier 1.1.1.4, local AS number 1111
BGP table version is 117, main routing table version 117
111 network entries and 112 paths using 14799 bytes of memory
21 BGP path attribute entries using 1092 bytes of memory
2 BGP rrinfo entries using 48 bytes of memory
11 BGP AS-PATH entries using 376 bytes of memory
7 BGP community entries using 168 bytes of memory
25 BGP route-map cache entries using 400 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Dampening enabled. 0 history paths, 0 dampened paths
BGP activity 243/968 prefixes, 247/135 paths, scan interval 15 secs
Neighbor
1.1.1.1
1.1.1.6
194.68.128.22
194.68.128.33
cisco_border#
V
4
4
4
4
AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1111
1015
1167
117
0
0
00:01:29
8
1111
949
1168
117
0
0
00:01:29
1
2222
2129
1036
117
0
0
00:00:52
100
3333
1013
987
117
0
0
00:01:14
1
Partial route-table:
cisco_border#sh ip bgp
BGP table version is 117, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
62
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
Network
Next Hop
Metric LocPrf Weight Path
*> 3.3.0.0/16
194.68.128.33
1
101
0 3333 i
*> 34.1.1.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.2.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.3.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.4.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.5.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.6.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.7.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.8.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.9.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.10.0/24
194.68.128.22
1622
0 2222 53285
33299 51178 {27016,57039,16690} e
*> 34.1.11.0/24
194.68.128.22
2563
0 2222 59294
21396 25638 36040 {18917,28575,47361} e
このコードは、ダンピングイベントのデバッグを示しています。
cisco_border#
cisco_border#debug ip bgp damp
*Mar 1 07:59:59.798: BGP(0): charge penalty for 34.1.37.0/24 path 2222
4482 46350 49469 25721 33830 {51019} with halflife-time 15 reuse/suppress
750/2000
*Mar 1 07:59:59.802: BGP(0): flapped 1 times since 00:00:00. New penalty
is 1000
*Mar 1 08:00:00.814: BGP(0): charge penalty for 34.1.47.0/24 path 2222
11885 8653 38033 34606 with halflife-time 15 reuse/suppress 750/2000
*Mar 1 08:00:00.818: BGP(0): flapped 2 times since 00:00:16. New penalty
is 1988
*Mar 1 08:00:01.810: BGP(0): charge penalty for 34.1.53.0/24 path 2222
24193 29338 1945 65275 {10312,4520} with halflife-time 15 reuse/suppress
750/2000
*Mar 1 08:00:01.814: BGP(0): flapped 1 times since 00:00:00. New penalty
is 1000
*Mar 1 08:00:02.798: BGP(0): charge penalty for 34.1.13.0/24 path 2222
59294 21396 25638 36040 {18917,28575,47361} with halflife-time 15
reuse/suppress 750/2000
*Mar 1 08:00:02.802: BGP(0): flapped 1 times since 00:00:00. New penalty
is 1000g all
*Mar 1 08:00:03.806: BGP(0): charge penalty for 34.1.7.0/24 path 2222
53285 33299 51178 {27016,57039,16690} with halflife-time 15
reuse/suppress 750/2000
*Mar 1 08:00:03.810: BGP(0): flapped 1 times since 00:00:00. New penalty
is 1000
cisco_border#no debug all
All possible debugging has been turned off
Copyright © 2001, Juniper Networks, Inc.
63
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
このコードはダンプルートを示しています。
cisco_border#sh ip bgp damp
BGP table version is 1001, local router ID is 1.1.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
From
*d 34.1.2.0/24
194.68.128.22
{27016,57039,16690} e
Reuse
Path
00:21:10 2222 53285 33299 51178
JUNOSダンピングコンフィグレーションの例
この例は、同じ結果をもたらすJUNOSソフトウェアのダンピングコンフィグレーションの一部を示しています。
[edit protocols bgp]
lunkan@lena# show
traceoptions {
file bgp;
flag damping detail;
}
log-updown;
group external {
type external;
local-address 194.68.128.2;
damping;
import ebgp_in;# /* Policy for inbound EBGP ( Damping etcÖ).
No damp on internal routes can happenÖ */
export ebgp;
neighbor 194.68.128.22 {
peer-as 2222;
}
neighbor 194.68.128.33 {
peer-as 3333;
}
}
group internal {
type internal;
local-address 1.1.1.2;
export internal;
neighbor 1.1.1.1 {
authentication-key "$9$-Xds4UjqQF/ZUjqPQ9C";
}
neighbor 1.1.1.6;
}
}
policy-statement ebgp_in {
term 1918 {
from {
route-filter 0.0.0.0/0 exact;
route-filter 10.0.0.0/8 orlonger;
route-filter 127.0.0.0/8 orlonger;
route-filter 192.168.0.0/16 orlonger;
}
then reject;
}
term local_pref {
from as-path from_pagent;
then {
local-preference 101;
}
}
term no_damp {/* DNS root servers, no damp of these */
64
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
from {
route-filter 198.41.0.0/24 exact;
route-filter 128.9.0.0/16 exact;
route-filter 192.33.4.0/24 exact;
route-filter 128.8.0.0/16 exact;
route-filter 192.203.230.0/24 exact;
route-filter 192.5.4.0/23 exact;
route-filter 128.63.0.0/16 exact;
route-filter 192.36.148.0/24 exact;
route-filter 193.0.14.0/24 exact;
route-filter 198.32.64.0/24 exact;
route-filter 202.12.27.0/24 exact;
}
then {
damping no;
accept;
}
term damp {
then damping yes;/* Damping apply of rest of routes */
}
}
damping no {
disable;
}
damping yes {
half-life 15;
reuse 750;
suppress 2000;
max-suppress 60;
}
}
[edit protocols bgp]
lunkan@lena#
以下は、35本のルートがダンピング状態にあるユニキャストテーブル(BGPテーブル)を要約したものです。
[edit protocols bgp]
lunkan@lena# run show bgp summary
Groups: 3
Peers: 4 Down Peers: 0
Table
Tot Paths Act Paths Suppressed
Pending
inet.0
113
9
35
0
inet.2
0
0
0
0
Peer
AS
InPkt
OutPkt
State|#Active/Received/Damped...
194.68.128.22
2222
1
6
0/101/35
0/0/0
194.68.128.33
3333
37
36
1/3/0
0/0/0
1.1.1.1
1111
388
461
7/8/0
0/0/0
1.1.1.6
1111
34
461
1/1/0
0/0/0
Copyright © 2001, Juniper Networks, Inc.
History Damp State
101
101
0
0
OutQ
Flaps Last Up/Dwn
0
29
00:00:05
0
4
00:15:23
0
1
00:15:27
0
1
00:15:33
65
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
このコード例は、ダンピングのトレースを示しています。
[edit protocols bgp traceoptions]
lunkan@lena# show
file bgp;
flag damping;
このコード例は、ダンピングのモニタリングを示しています。
lunkan@lena# run monitor start bgp
Jan 11 02:18:36 bgp_damp_change: Change event
Jan 11 02:18:36 bgp_dampen: Damping 34.1.1.0
Jan 11 02:18:36 bgp_rt_change: Dampening makes
Jan 11 02:18:36 bgp_damp_change: Change event
Jan 11 02:18:36 bgp_dampen: Damping 34.1.2.0
Jan 11 02:18:36 bgp_rt_change: Dampening makes
Jan 11 02:18:36 bgp_damp_change: Change event
Jan 11 02:18:36 bgp_dampen: Damping 34.1.3.0
Jan 11 02:18:36 bgp_rt_change: Dampening makes
Jan 11 02:18:36 bgp_damp_change: Change event
Jan 11 02:18:36 bgp_dampen: Damping 34.1.4.0
Jan 11 02:18:36 bgp_rt_change: Dampening makes
Jan 11 02:18:36 bgp_damp_change: Change event
Jan 11 02:18:36 bgp_dampen: Damping 34.1.5.0
Jan 11 02:18:36 bgp_rt_change: Dampening makes
Jan 11 02:18:36 bgp_damp_change: Change event
route unusable
route unusable
route unusable
route unusable
route unusable
このコードは、ダンプルートからの出力を示しています。
lunkan@lena# run show route damping suppressed
inet.0: 125 destinations, 125 routes (22 active, 0 holddown, 103 hidden)
+ = Active Route, - = Last Active, * = Both
34.1.1.0/24
34.1.2.0/24
34.1.3.0/24
34.1.4.0/24
34.1.5.0/24
34.1.6.0/24
34.1.7.0/24
34.1.8.0/24
66
[BGP] 00:00:19, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:19, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:19, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:19, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:19, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:19, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:03, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:19, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
この例は、ダンピングヒストリ内のすべてのルートを示しています。
lunkan@lena# run show route damping history
inet.0: 125 destinations, 125 routes (22 active, 0 holddown, 103 hidden)
+ = Active Route, - = Last Active, * = Both
34.1.1.0/24
34.1.2.0/24
34.1.3.0/24
34.1.4.0/24
34.1.5.0/24
34.1.6.0/24
34.1.7.0/24
34.1.8.0/24
34.1.9.0/24
34.1.10.0/24
[BGP] 00:00:43, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:43, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:43, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:43, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:36, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:15, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:43, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:43, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:43, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
> to 194.68.128.22 via fxp1.0
[BGP] 00:00:43, MED 1622, localpref 100
AS path: 2222 53285 33299 51178 {16690
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
27016 57039} E
ダンプルートの出力の詳細は、次のとおりです。
lunkan@lena# run show route damping history detail
inet.0: 125 destinations, 125 routes (22 active, 0 holddown, 103 hidden)
+ = Active Route, - = Last Active, * = Both
34.1.1.0/24 (1 entry, 0 announced)
BGP
Preference: /-101
Nexthop: 194.68.128.22 via fxp1.0, selected
State: <Hidden Ext>
Local AS: 1111 Peer AS: 2222
Age: 42 Metric: 1622
Task: BGP_2222.194.68.128.22+11000
AS path: 2222 53285 33299 51178 {16690 27016 57039} E
Localpref: 100
Router ID: 194.68.128.22
Merit (last update/now): 12110/12110
Damping parameters: "yes"
Last update:
00:00:01
First update:
00:06:21
Flaps: 21
Suppressed. Reusable in:
00:59:40
Preference will be: 170
History entry. Expires in:
00:59:40
Copyright © 2001, Juniper Networks, Inc.
67
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
受信する最大プリフィックスの保護
ピアが、ネゴシエートした数を上回るプリフィックスを送信しないようにするために、maximum-prefixを使用し
ます。隣接ルーターから受信する最大プリフィックス数の基本的な制限を定義することができます。以下は、一例です。
Log/inform when threshold exceeds
Shutdown peer that exceed limit
一般に、シャットダウン値が定義されている場合はかなり大きい数値を設定し、イベントが通知しかされない場合はよ
り現実的な値を設定します。
IOSの最大受信プリフィックスのコンフィグレーション例
この例は、警告制限をセットし、さらにBGPシャットダウンを設定しています。シャットダウンは100プリフィック
スで、しきい値の70%を超えると警告が送られます。
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.4
bgp log-neighbor-changes
bgp deterministic-med
bgp dampening route-map damp
aggregate-address 100.100.0.0 255.255.0.0 summary-only
aggregate-address 100.200.0.0 255.255.0.0 summary-only
timers bgp 30 90
neighbor internal peer-group
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor internal next-hop-self
neighbor internal soft-reconfiguration inbound
neighbor external peer-group
neighbor external soft-reconfiguration inbound
neighbor external prefix-list martians in
neighbor external route-map int_policy in
neighbor external route-map ext_policy out
neighbor external maximum-prefix 100 70
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.6 peer-group internal
neighbor 194.68.128.22 remote-as 2222
neighbor 194.68.128.22 peer-group external
neighbor 194.68.128.33 remote-as 3333
neighbor 194.68.128.33 peer-group external
no auto-summary
!
ログからのメッセージ(警告、その後上限に達した場合の停止)は次のとおりです。
*Mar 1 03:19:44.275: %BGP-4-MAXPFX: No. of prefix received from
194.68.128.22 (afi 0) reaches 71, max 100
*Mar 1 03:19:49.435: %BGP-3-MAXPFXEXCEED: No. of prefix received from
194.68.128.22 (afi 0): 101 exceed limit 100
68
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
BGPサマリで、以下のように、コネクションの切断を確認することができます。
cisco_border#sh ip bgp sum
BGP router identifier 1.1.1.4, local AS number 1111
BGP table version is 1420, main routing table version 1420
12 network entries and 14 paths using 1668 bytes of memory
11 BGP path attribute entries using 572 bytes of memory
3 BGP rrinfo entries using 72 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
7 BGP community entries using 168 bytes of memory
4 BGP route-map cache entries using 64 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Dampening enabled. 0 history paths, 0 dampened paths
3 received paths for inbound soft reconfiguration
BGP activity 256/270 prefixes, 2058/2044 paths, scan interval 15 secs
Neighbor
1.1.1.1
1.1.1.6
194.68.128.22
(PfxCt)
194.68.128.33
cisco_border#
Copyright © 2001, Juniper Networks, Inc.
V
4
4
4
AS MsgRcvd MsgSent
1111
489
904
1111
400
904
2222
607
517
4
3333
286
276
TblVer InQ OutQ Up/Down State/PfxRcd
1420
0
0 03:18:18
8
1420
0
0 03:18:22
1
0
0
0 00:00:57 Idle
1420
0
0 02:14:39
0
69
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
JUNOSの最大受信プリフィックスのコンフィグレーション例
この例は、警告制限をセットし、さらに、さらにBGPシャットダウンを設定しています。シャットダウンは100プリ
フィックスで、しきい値の70%を超えると警告が送られます。
[edit protocols bgp]
lunkan@lena# show
traceoptions {
file bgp;
flag damping detail;
}
log-updown;
group external {
type external;
local-address 194.68.128.2;
damping;
import ebgp_in;
family inet {
unicast {
prefix-limit {
maximum 100;
teardown 70;
}
}
}
export ebgp;
neighbor 194.68.128.22 {
peer-as 2222;
}
neighbor 194.68.128.33 {
peer-as 3333;
}
}
group internal {
type internal;
local-address 1.1.1.2;
export internal;
neighbor 1.1.1.1 {
authentication-key "$9$HkPQ/CuEcln/CuBEeK";
}
neighbor 1.1.1.6;
}
[edit protocols bgp]
lunkan@lena#
70
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
この例は、ピアグループ内のすべてのピアに対応する値を示しています。
lunkan@lena# run show bgp group external
Group Type: External
AS: 3333
Local AS: 1111
Export: [ ebgp ]
Import: [ ebgp_in ]
Options: <Preference LocalAddress HoldTime LogUpDown Damping
AddressFamily PeerAS Multipath PrefixLimit LocalAS Refresh>
Address families configured: inet-unicast
Local Address: 194.68.128.2
Holdtime: 90
Preference: 170
Local AS: 1111 Local System AS: 1111 Total peers: 1
Established: 1
194.68.128.33+11000
Group Type: External
AS: 2222
Local AS: 1111
Export: [ ebgp ]
Import: [ ebgp_in ]
Options: <Preference LocalAddress HoldTime LogUpDown Damping
AddressFamily PeerAS Multipath PrefixLimit LocalAS Refresh>
Address families configured: inet-unicast
Local Address: 194.68.128.2
Holdtime: 90
Preference: 170
Prefix Limit for inet-unicast: 100 (teardown, warning at 70%)
Local AS: 1111 Local System AS: 1111 Total peers: 1
Established: 1
194.68.128.22+179
[edit protocols bgp]
この例は、1つのピアによってアナウンスされたプリフィックスが70を超えたときに、ログから送られる警告メッセ
ージを示しています。
Jan 14 20:46:56 [1.1.1.2.4.0] lena: rpd[305]: 194.68.128.22 (External AS 2222):
Configured maximum prefix threshold exceeded for inet-unicast nlri: 71
この例は、1つのピアからアナウンスされたプリフィックスが100を超えたときに、ログから送られるシャットダウ
ンメッセージを示しています。
Jan 14 20:47:08 [1.1.1.2.4.0] lena: rpd[305]: 194.68.128.22 (External AS 2222):
Shutting down peer due to exceeding configured prefix limit
for inet-unicast nlri: 101
Copyright © 2001, Juniper Networks, Inc.
71
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
JUNOSソフトウェアとIOSの相違点
JUNOSソフトウェアとIOSには、いくつかの大きな相違点があります。ネットワークのデザインおよび実装時に、ミ
スや潜在する問題を回避するためには、これらの相違点を理解しておく必要があります。
IGPロードシェアリング
IOSバージョン12.0以上は、CEFフォワーディングアルゴリズムの中に、デフォルトで、宛先ごとのロードシェアリ
ング機能を備えています。JUNOSでは、デフォルトで、プリフィックスごとにランダムに選択したネクストホップを
フォワーディングテーブルに登録します(つまり、プリフィックスは特定のリンクに結合されます)。この実装は、大規
模なバックボーンのフォワーディングテーブルの性質から必然的に生じたものです。ロードシェアリングを実行する場
合は、以下の例に示すように、明示的に設定することができます。
policy-options {
policy-statement load_balance {
then {
load-balance per-packet; /* Specific prefix can be used,
instead of the whole forwding table
if desire */
}
}
}
routing-options {
forwarding-table {
export load_balance;
}
}
以下は、上記コンフィグレーションのJUNOSフォワーディングテーブルの出力例です。
lunkan@petra# run show route forwarding-table destination 1.1.1.1 detail
Routing table:: inet
Internet:
Destination Type RtRef InIf Flags
Nexthop Type Index NhRef Netif
1.1.1.1/32
user
0
0 0x10
ulst
42
5
2.2.2.24 ucst
28
4 e1-0/2/0.0
2.2.2.28 ucst
41
3 e1-0/2/1.0
ロードシェア機能を設定すると、IP2を使用している場合は最高16本のロードシェアパスに対してハッシュテーブル
が作成されます。IP1を用いている場合は、8本のロードシェアパスが使用されます。宛先アドレス、送信元アドレス、
および宛先ポートが、ハッシュテーブルの作成時に考慮されます。ハッシュテーブルに従うことにより、特定フロー内
のトラフィックは、常に、同じパスを経由するため、ジッタを回避することができます。
JUNOSソフトウェアの[load-balance per-packet]キーワードは、IOS/CEF [ip
load-sharing
per-packet]コマンドと同様には動作しません。パケット単位のロードバランシング機能を使用している場合は、
パケットの並べ替えが生じる可能性があるため、複数のパケットを異なる複数のリンクへ転送することは推奨されてい
ません。
72
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
IGPとEGPの両方でのルートのアドバタイズ
デフォルトでは、BGPはUPDATEメッセージから取得したルート情報をJUNOS BGPルーティングテーブルに格納
し、ルーティングテーブルはアクティブルートだけをBGPへエクスポートします。その後、BGPはそれをピアにアド
バタイズします。ルートがIS-ISとBGPの両方にある場合は、BGP隣接ルーター(IBGPまたはEBGP)にはエクスポー
トされません。主な理由は、IGPルートの方が優先順位が高いからです。たとえば、伝送段階で、ルートがIGPとBGP
の両方で搬送されたとしたら、ルートポリシーはBGP経路を認識しないため、問題が生じることがあります。ルーテ
ィングテーブルに、BGPから学習した最適ルートをエクスポートさせるためには、JUNOSソフトウェアがそれらをア
クティブルートとして選択しなかった場合であっても、advertise-inactive ステートメントを含める必要が
あります。IOSのデフォルトでは、アクティブルートと非アクティブルートのすべてがBGP内でアナウンスされます。
以下は、advertise-inactive の使用例です。
protocols {
bgp {
advertise-inactive; /* Advertise inactive routes in BGP */
BGPタイマー
デフォルトでは、BGP4タイマーパラメータは、セッションセットアップ時にネゴシエートされます。JUNOSのデフ
ォルト値は30/90で、これはキープアライブが30秒ごとに、ホールドダウンが90秒ごとに送信されることを意味し
ています。Ciscoのデフォルト値は60/180です。ネゴシエーションの後、もっとも小さい値が選択されます
(30/90)。推奨されるプロシージャは、IGPルックアップを通じてBGPネクストホップを搬送するやり方です。した
がって、BGPタイマーは、収束において特に重要にはなりません。一般に、JuniperルーターとCiscoルーターの間の
IBGP/EBGPピアリングでは、互いにネゴシエートするため問題は発生しません。ただし、場合によっては、デフォル
トのホールドダウンタイマーが異なるため、IOSピアがJUNOS-IOSピアやJUNOS-JUNOSピアより大きい値を持っ
てしまうことがあります。
この例は、IOSのデフォルト値をJUNOSのデフォルト値へどのように変更するかを示しています。
router bgp 3333
no synchronization
bgp router-id 3.3.3.3
bgp always-compare-med
bgp log-neighbor-changes
bgp deterministic-med
neighbor external peer-group
neighbor external remote-as 1111
neighbor external timers 30 90/* Timers for BGP connections in peer
grp */
neighbor 194.68.128.2 peer-group external
neighbor 194.68.128.2 peer-group external
no auto-summary
Copyright © 2001, Juniper Networks, Inc.
73
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
この例は、JUNOSソフトウェアのデフォルト値をIOSのデフォルト値へどのように変更するかを示しています。
bgp {
path-selection always-compare-med;
log-updown;
local-as 1111;
group external {
type external;
local-address 194.68.128.2;
hold-time 180/* Timers for BGP connections in peer grp */
peer-as 2222
neighbor 194.68.128.33;
neighbor 194.68.128.34;
}
}
}
以下の出力から、BGPタイマーがCiscoのデフォルト値を使用していることを確認できます。
lunkan@lena# run show bgp neighbor 194.68.128.33
Peer: 194.68.128.33+11005 AS 3333
Local: 194.68.128.2+179 AS 1111
Type: External State: Established
Flags: <>
Last State: OpenConfirm
Last Event: RecvKeepAlive
Last Error: None
Export: [ ebgp ]
Import: [ ebgp_in ]
Options: <Preference LocalAddress HoldTime LogUpDown Damping
AddressFamily PeerAS PrefixLimit LocalAS Refresh>
Address families configured: inet-unicast
Local Address: 194.68.128.2
Holdtime: 180
Preference: 170
Prefix Limit for inet-unicast: 100 (teardown, warning at 70%)
Local AS: 1111 Local System AS: 1111 Number of flaps: 1
Peer ID: 3.3.3.3
Local ID: 1.1.1.2
Active Holdtime: 180
Keepalive Interval: 60
EBGPパス選択
デフォルトでは、同じピアASを持つルートの MED だけが比較されます。ただし、ルーティングテーブルパス選択オプ
ションを設定して、異なる方法で動作させることができます。ルーティングテーブルパス選択は、 cisco-non-
deterministic と always-compare-med の2通りの内どちらか一方に設定することができます。
cisco-non-deterministic は、IOSのデフォルト動作と同じく非決定論的に動作します。アクティブパス
は常に最初に選択されます。非アクティブだが適格なパスはすべて、アクティブパスの次に選択され、もっとも最近の
パスを先頭に、受信したときと同じ順番で維持されます。不適格なパスは、リストの最後に残ります。新たなパスをル
ーティングテーブルに追加すると、MED 等価ルールを満たしていないため決して選択されることのないパスを対象か
ら外すことなく、パス比較が実行されます。非決定論的なパス選択プロセスとなるため、互換性を保つという目的の場
合に限って、このコマンドを使用して下さい。
always-compare-med 値は、比較するルートのピアASが同一であるかどうかに無関係に、常にルーターが
MEDを比較するように保証します。
74
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
bgp deterministicmed コマンドと同じである点に注意してください。以下の例は、path-selection オプションのJUNOSコン
JUNOSのデフォルト動作(追加コマンドを使用しない状態)は、Ciscoのオプションの
フィグレーションの一部を示しています。
protocols {
bgp {
path-selection always-compare-med;/* Path selection attribute */
ルーターのサービスアクセス制限
サービスプロバイダ環境に共通する問題の1つは、ルーターが侵入に対してオープンなことです。ルーターへのアクセ
スを保護することは、カスタマへのサービスを維持する上で非常に重要となります。保護は、SNMPやNTPなどの特
定のサービスごとに入力パケットの送信元アドレスに基づいて実行できます。sshやTelnetセッションの認証でも、
RADIUS、TACACS+、およびワンタイムパスワードを用いた対話型アプローチを使用することができます。
ここでは、以下のタスクを実行する2つのコンフィグレーションについて説明します。
■特定のプリフィックスとホストからのTelnetだけを受け入れる
■ RADIUSまたはTACACS+プロトコルプライマリを介してユーザを認証する
■ ユーザをアクセスレベルが制限されたグループへマップする
■ 送信元アドレスプリフィックスとホストに基づいて、SNMPおよびNTPアクセスを提供する
■ TCP (FTP、Telnet、ssh)、SNMP、およびルーターからのシステムログメッセージの特定の送信元アドレスを
使用する
■ 送信元としてRFC 1918アドレスを持つパケットを拒否しログする
■ コアダンプを処理する
IOSのアクセス制限のコンフィグレーション
この例は、Ciscoルーターへのアクセスを制限するコンフィグレーションの一部を示しています。簡潔にするため、わ
かり易いようにコンフィグレーションを区切っています。これは、アクセスアイテムの安全性を確保するための一例に
過ぎない点に注意してください。
以下は、IOS認証スキーマの例です。
aaa new-model
aaa authentication login default tacacs+ local /* Default TACACS, if no
service then local user
for login */
aaa authentication login console none /* No console authentication */
aaa authentication enable default TACACS+ enable /* Default Tacacs, if no
service then local user
for enable */
enable secret 5 $1$cOwR$49I5ixU1CqiKrjco8948tp
!
以下は、特定のユーザの特権レベルを設定するIOSコンフィグレーションの例です。
privilege exec level 1 show configuration/* Authorization, level 1 user
allowed do show conf, etc. */
privilege exec level 1 show
Copyright © 2001, Juniper Networks, Inc.
75
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
以下は、FTPなどの各種サービスのIOSコンフィグレーションの例です。
clock timezone CET 1
ip subnet-zero
ip rcmd rsh-enable
ip rcmd remote-host root 192.168.1.10 enable root /* RSH incoming accept
from specified host */
ip cef
ip tcp window-size 65535
ip tftp source-interface Loopback0/* Source address for TFTP packets
originate on router */
ip ftp source-interface Loopback0/* Source address for FTP packets
originate on router */
ip ftp username lunkan/* If using FTP service, username, and
password below */
ip ftp password 7 018rfnurcp783jmc0u6
ip host tftps 192.168.1.10/* TFTP server */
ip domain-name lunkan.net
ip name-server 192.168.1.10/* DNS server */
!
以下は、サービスを拒否し、アクセスを阻止するためのIOSアクセスリストコンフィグレーションの例です。
interface Loopback0
ip address 1.1.1.1 255.255.255.255
no ip directed-broadcast
!
interface ethernet0
description Link to GIX
ip address 194.68.128.1 255.255.255.0
ip broadcast-address 194.68.128.255
ip access-group 100 in/* Filter inbound traffic */
no ip directed-broadcast/* No forward of packet with broadcast
destinations */
no ip redirect/* Disable ICMP redirect */
ip route-cache flow/* Access-list on interface, route-cache flow instead
CEF for better performance*/
no ip route-cache cef
no ip mroute-cache
load-interval 30
no cdp enable/* CDP Level 2 information protocol disable, no gain on
EBGP segment */
!
以下は、IOSシステムログコンフィグレーションの例です。
!
logging facility local7/* System log facility */
logging source-interface Loopback0/*Source address for system log
packets originate on router */
logging 192.168.1.10/* System log server */
logging buffered 32768 debugging/* Logging information locally stored */
logging console alerts /* Local message to consol, level Alerts and
above */
Example IOS Access List
76
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
以下は、ここで取り上げたコンフィグレーションで使用されているIOSアクセスリストの例です。
access-list
access-list
access-list
access-list
access-list
access-list
access-list
access-list
access-list
1 permit 192.168.254.0 0.0.0.255 log
1 permit 192.168.1.10 0.0.0.0 log
2 permit 192.168.254.0 0.0.0.255 log
3 permit 192.168.1.10 0.0.0.0 log
100 deny
ip 10.0.0.0 0.255.255.255 any log
100 deny
ip 127.0.0.0 0.255.255.255 any log
100 deny
ip 172.16.0.0 0.15.255.255 any log
100 deny
ip 192.168.0.0 0.0.255.255 any log
100 permit ip any any
以下は、IOS SNMPコンフィグレーションの例です。
!
snmp-server community ida RO 2/* Host with access read-only to router,
see access-list 2 */
snmp-server community lena RW 3/* Host with access read-write to router,
see access-list 3 */
snmp-server trap-source Loopback0/* Source address for SNMP trap
(UDP 162) packets originate on router */
snmp-server contact [email protected]
snmp-server enable traps config/* SNMP trap categories */
snmp-server enable traps entity
snmp-server enable traps envmon
snmp-server enable traps bgp
snmp-server host 192.168.1.10 lunkan /* Destination address for SNMP
traps and community */
!
以下は、IOS TACACS+コンフィグレーションの例です。
!
tacacs-server host 192.168.1.10/* Tacacs server */
tacacs-server key 12345678
!
以下は、ローカルディスクスペースが限られている場合のコアダンプの処理例です。コアダンプは、FTPを自動的に起
動し、リストされているFTPサーバアドレス(この場合は、192.168.1.10)へ送信されます。
exeption core-file this_router_name/* Coredump sent to FTP server */
exception protocol ftp
exception dump 192.168.1.10
Copyright © 2001, Juniper Networks, Inc.
77
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
以下は、規制されたIOS Telnetログインアクセスの例です。
!
line con 0
exec-timeout 60 0
login authentication console
transport input none
line aux 0
line vty 0 4
access-class 1 in/* Restrict Telnet based on source addressÖ*/
exec-timeout 120 0
password 7 123A0404012E1810
!
以下は、IOS NTPコンフィグレーションの例です。
ntp
ntp
ntp
ntp
clock-period 17179850
source Loopback0/* NTP use lo0 as source address */
update-calendar
server 192.168.1.10/* NTP server (peering can also be done) */
JUNOSのアクセス制限のコンフィグレーション
この例は、インターネットプロセッサII ASICを備えたJuniperルーターへのアクセスを制限するコンフィグレーション
の一部を示しています。これは、アクセスアイテムの安全性を確保するための単なる一例である点に注意してください。
以下は、JUNOSのサービスコンフィグレーションとログインの認証の例です。JUNOSソフトウェアでは、1回しか
認証する必要がなく、認証後は、RADIUSやTACACS+を使って、またはルーター上でローカルに特権レベルを設定
できる点に留意してください。
system {
host-name lunkan_home;/* IP hostname */
domain-name lunkan.net;/* IP Domain */
default-address-selection;/* All UDP,TCP,ICMP ex FTP, system log, ping packets
use lo0 as source */
no-redirects; /* No ip ICMP redirects */
name-server {
192.168.1.10; /* DNS server */
}
root-authentication {/* root user password for local root user */
encrypted-password "$1$kksX6$i58hdOpkMI4pKfFlgkt94."; # SECRET-DATA
}
authentication-order [ radius password ]; /* Radius will be used primary as
authentication validation */
radius-server {
192.168.1.10 {/* Radius server */
secret "$9$Ch.9ABElhk6-wM8"; # SECRET-DATA # Radius key
timeout 5;
retry 2;
}
login {
class noc_grp {
permissions [ admin interface routing system firewall view];
/* Rights for noc_grp*/
user lunkan {/* Ex of local backup user with super-user access */
uid 2001;
class super-user; /* Class belonging for user lunkan (handle
access level) */
authentication {
encrypted-password "$1$sGD5.$/8Ql5qZrDovMr7CgupSHo0"; # SECRET-DATA
}
78
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
}
user remotex {
full-name "radius group-user, super-user rights"; /*RADIUS super-user
template grp*/
uid 2010;
class super-user;
}
user remotexx {
full-name "radius group-user, read rights";/* RADIUS show/noc template grp */
uid 2011;
class noc_grp;
}
}
services { /* Allowed service, note that finger/tftp etc are
not enable */
ssh;
telnet;
ftp;
/* Note that JunOS use interactive FTP, not TFTP */
}
syslog {
user * {
any alerts;/* Local message to vty, level Alerts and above */
}
console {
alerts;/* Local message to consol, level Alerts and above */
}
host 192.168.1.10 { /* Syslog server */
any any;/* All is sent to syslog server */
facility-override local1;/* Facility local1 will be used,
since core router */
log-prefix Lunkan_home;/* All messagies will be added with
prefix Lunkan_home */
}
file messages {
any notice;
authorization info;
}
file cli_trace {
authorization any;/* All user logins log to local file
on router */
interactive-commands any;/* All CLI actions log to local file
on router */
archive size 50m files 2 world-readable; /* Local user log 50 Mb, with
overwrite to backup file */
}‘‘‘
}
ntp {
server 192.168.1.10;/* NTP server, peer is not used but can
also/instead be used */
}
}
chassis {
no-source-route;/* No ip source-routing */
}
protocols {
bgp {
traceoptions {/* Start variables use when BGP monitoring */
file bgp;
flag state;
flag damping;
flag keepalive;
}
log-updown;/* Log message when adjencys flap */
}
isis {
traceoptions {/* Start variables use when BGP monitoring */
file isis;
flag state;
flag hello;
}
Copyright © 2001, Juniper Networks, Inc.
79
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
以下は、JUNOS SNMPコンフィグレーションの例です。SNMPを通じて読み取りパーミッションだけが許可されて
いる点に注意してください。
snmp {
describtion "blaha";
location " In my home lab";
contact "[email protected]";
community read-only {
authorisation read-only;
clients {
192.168.1.10;/* NMS host, source address for snmp-get
(UDP 161) allowed */
}
}
trap-group ida {
version all;
categories authentication chassis link routing
/* SNMP Trap
categories */
targets {
192.168.1.10; /*NMS host, destination for traps (UDP 162)*/
}
}
}
lo0インタフェース上にフィルタを設定することで、ルーティングエンジンへのトラフィックを制限することができま
す(ルーティングエンジンへ転送されるすべてのトラフィック)。Juniperルーター上でこのようにトラフィックを制限
しても、パフォーマンスには影響しない点に注意してください。すべて拒否項目のため、コンフィグレーションが長く
なっています。制限されていないアクセスを監視することができるように、ロギングが実行されます。望ましくないト
ラフィックパターンを監視するためにサンプリングを設定し、制限されていないアクセスのイベントを検索するための
適度な詳細レベルを指定することができます。
firewall {
filter access {
term telnet_ok {
from {
source-address {
192.168.254/24; /* Telnet allowed from prefix and
below host, ex a ssh/RADIUS
server */
192.168.1.10/32;
}
protocol tcp;
destination-port telnet;
}
then {
accept;
}
}
term telnet-deny {
from {
protocol tcp;
destination-port telnet;
}
then {
count telnet_deny;/* Deny Telnet counted */
log;/* Deny Telnet log to var/log file */
discard;
}
80
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
}
term snmp_ok {
from {
source-address {
192.168.254/24;
192.168.1.10/32;
}
protocol udp;
destination-port snmp;
}
then {
accept;
}
}
term snmp_deny {
from {
protocol udp;
destination-port snmp;
}
then {
count snmp_deny;
log;
discard;
}
}
term ntp_ok {
from {
source-address {
192.168.254/32;
192.168.1.10/32;
}
protocol udp;
destination-port ntp;
}
then {
accept;
}
}
term ntp_deny {
from {
protocol udp;
destination-port ntp;
}
then {
count ntp_deny;
log;
discard;
}
}
term permit_any {/* So that BGP, IGP etc is accepted to RE */
then accept;
}
}
}
Copyright © 2001, Juniper Networks, Inc.
81
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
以下は、JUNOSのカウンタリストの例です。
lab@M10-Oslo> show firewall filter access
Filter/Counter
Packet count
access
telnet_deny
0
snmp_deny
0
ntp_deny
0
Byte count
0
0
0
以下は、ルーティングエンジンへ転送されるすべてのトラフィックに対して有効となるよう、(ループバックが設定さ
れていない場合であっても)ループバックにフィルタを適用するJUNOSコンフィグレーションの例です。
lo0 {
unit 0 {
family inet {
filter {
input access; /* Filter applied to logical
interface (RE) */
}
address 1.1.1.1/32;
}
family iso {
address 47.0001.1921.6825.4254.00;
}
}
}
以下は、特定の入力トラフィック(たとえば、相互接続点のインタフェースからのトラフィック)をフィルタする
JUNOSコンフィグレーションの例です。この方式は、インタフェース上のIOSアクセスリストと同等です。
firewall {
filter access_2 {
term martians {
from {
source-address {
127.0.0.0/8;/* rfc1918 denied routes */
10.0.0.0/8;
172.16.0.0/12;
192.168.0.0/16;
}
then {
count martians;/* Reject counted */
reject administratively-prohibited; /* Reject and send
ICMP messageÖ */
}
}
term permit_any {/* Everything else is accepted */
then accept;
}
}
}
82
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
以下は、インタフェースにフィルタを適用するJUNOSコンフィグレーションの例です。
fe-0/3/3 {
unit 0 {
family inet {
filter {
input access_2;/* Filter inbound from ex GIX */
}
address 194.68.128.1/24;
}
}
}
Copyright © 2001, Juniper Networks, Inc.
83
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
付録
JUNOS Lena境界ルーター
version 4.2R2.4;
system {
host-name lena;
domain-name lunkan.net;
time-zone Europe/Stockholm;
default-address-selection;
no-redirects;
login {
user lunkan {
uid 2001;
class super-user;
authentication {
encrypted-password "$1$.vHnM$BKQpc.3dFteKZ.vheNof0."; #
SECRET-DATA
}
}
}
services {
telnet;
ssh;
ftp;
}
syslog {
user * {
any emergency;
}
host 192.168.1.10 {
any any;
facility-override local7;
log-prefix lena;
}
file messages {
any notice;
authorization info;
}
}
ntp {
peer 192.168.1.10;
}
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 1.1.0.2/24;
}
family iso;
}
}
fxp1 {
unit 0 {
family inet {
address 194.68.128.2/24;
}
family iso;
}
}
84
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
lo0 {
unit 0 {
family inet {
address 1.1.1.2/32;
}
family iso {
address 47.0001.0010.0100.1002.00;
}
}
}
}
routing-options {
aggregate {
route 100.100.0.0/16 {
as-path {
origin igp;
atomic-aggregate;
aggregator 1111 1.1.1.2;
}
}
route 100.200.0.0/16 {
as-path {
origin igp;
atomic-aggregate;
aggregator 1111 1.1.1.2;
}
}
}
router-id 1.1.1.2;
autonomous-system 1111;
}
protocols {
bgp {
path-selection always-compare-med;
traceoptions {
file bgp;
flag route receive;
flag damping;
flag state;
}
log-updown;
group external {
type external;
local-address 194.68.128.2;
damping;
import ebgp_in;
family inet {
unicast {
prefix-limit {
maximum 100;
teardown 70;
}
}
}
export ebgp;
multipath;
neighbor 194.68.128.22 {
peer-as 2222;
}
neighbor 194.68.128.33 {
peer-as 3333;
}
}
Copyright © 2001, Juniper Networks, Inc.
85
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
group internal {
type internal;
local-address 1.1.1.2;
export internal;
neighbor 1.1.1.1 {
authentication-key "$9$4ToGiP5FApB.P5F6A1I";
}
neighbor 1.1.1.6;
}
}
isis {
traceoptions {
file isis;
flag state;
}
lsp-lifetime 65535;
level 2 wide-metrics-only;
interface all {
level 1 disable;
}
interface fxp1.0 {
passive;
}
}
}
policy-options {
policy-statement internal {
term one {
from protocol bgp;
then {
next-hop self;
}
}
}
policy-statement loadbalance {
then {
load-balance per-packet;
}
}
policy-statement ebgp {
inactive: term one {
from protocol aggregate;
then origin igp;
}
term two {
from {
route-filter 100.200.0.0/16 exact;
}
then {
metric 100;
as-path-prepend "1111 1111";
accept;
}
}
term three {
from {
route-filter 100.100.0.0/16 exact;
}
then {
metric 0;
accept;
}
}
86
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
term four {
from community bad;
then {
metric 100;
as-path-prepend "1111 1111 1111";
accept;
}
}
term five {
from community good;
then {
metric 0;
accept;
}
}
term last {
then reject;
}
}
policy-statement ebgp_in {
term 1918 {
from {
route-filter 0.0.0.0/0 exact;
route-filter 10.0.0.0/8 orlonger;
route-filter 127.0.0.0/8 orlonger;
route-filter 192.168.0.0/16 orlonger;
}
then reject;
}
term local_pref {
from as-path from_pagent;
then {
local-preference 101;
}
}
term no_damp {
from {
route-filter 198.41.0.0/24 exact;
route-filter 128.9.0.0/16 exact;
route-filter 192.33.4.0/24 exact;
route-filter 128.8.0.0/16 exact;
route-filter 192.203.230.0/24 exact;
route-filter 192.5.4.0/23 exact;
route-filter 128.63.0.0/16 exact;
route-filter 192.36.148.0/24 exact;
route-filter 193.0.14.0/24 exact;
route-filter 198.32.64.0/24 exact;
route-filter 202.12.27.0/24 exact;
}
then {
damping no;
accept;
}
}
term damp {
then damping yes;
}
}
policy-statement root_dns {
term dns {
from {
route-filter 198.41.0.0/24 exact;
route-filter 128.9.0.0/16 exact;
Copyright © 2001, Juniper Networks, Inc.
87
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
route-filter
route-filter
route-filter
route-filter
route-filter
route-filter
route-filter
route-filter
route-filter
route-filter
192.33.4.0/24 exact;
128.8.0.0/16 exact;
192.203.230.0/24 exact;
192.5.4.0/23 exact;
192.112.36.0/24 exact;
128.63.0.0/16 exact;
192.36.148.0/24 exact;
193.0.14.0/24 exact;
198.32.64.0/24 exact;
202.12.27.0/24 exact;
}
then accept;
}
}
community bad members 1111:6;
community good members 1111:5;
as-path from_pagent 2222;
damping no {
disable;
}
damping yes {
half-life 15;
reuse 750;
suppress 2000;
max-suppress 60;
}
}
88
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
JUNOS Lunkanコアルートリフレクタと192.168.1/24ネットワークのアクセスルーター
version 4.2R2.4;
system {
host-name lunkan;
domain-name lunkan.net;
default-address-selection;
no-redirects;
login {
user lunkan {
uid 2001;
class super-user;
authentication {
encrypted-password "$1$sGD5.$/8Ql5qZrDovMr7CgupSHo0"; #
SECRET-DATA
}
}
}
services {
telnet;
ssh;
ftp;
}
syslog {
user * {
any emergency;
}
host 192.168.1.10 {
facility-override local7;
log-prefix lunkan;
}
file messages {
any notice;
authorization info;
}
}
ntp {
peer 192.168.1.10;
}
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 1.1.0.1/24;
}
family iso;
}
}
fxp1 {
unit 0 {
family inet {
address 192.168.1.1/24 {
primary;
}
address 172.16.2.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 1.1.1.1/32;
Copyright © 2001, Juniper Networks, Inc.
89
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
}
family iso {
address 47.0001.0010.0100.1001.00;
}
}
}
}
routing-options {
router-id 1.1.1.1;
autonomous-system 1111;
}
protocols {
bgp {
traceoptions {
file bgp;
flag state;
}
log-updown;
group internal_rr {
type internal;
local-address 1.1.1.1;
export service;
cluster 1.1.1.1;
neighbor 1.1.1.2 {
authentication-key "$9$FckZ39pIEyWLNBIEyeW-d";
}
neighbor 1.1.1.3 {
authentication-key "$9$ebkK87wYojHmVwYoZjPf";
}
neighbor 1.1.1.4;
neighbor 1.1.1.5;
}
group internal {
type internal;
local-address 1.1.1.1;
export service;
neighbor 1.1.1.6;
}
}
isis {
traceoptions {
file isis;
flag state;
}
lsp-lifetime 65535;
level 1 disable;
level 2 wide-metrics-only;
interface all {
level 2 priority 127;
}
interface fxp1.0 {
disable;
}
}
}
policy-options {
policy-statement service {
term one {
from {
route-filter 192.168.1.0/24 exact;
}
then {
community add rfc1918;
90
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
accept;
}
}
term two {
from {
route-filter 172.16.2.0/24 exact;
}
then {
community add mcast;
accept;
}
}
}
community mcast members 1111:10;
community rfc1918 members no-export;
}
Copyright © 2001, Juniper Networks, Inc.
91
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
JUNOS Ida配信/POPルートリフレクタとIS-IS Level 2-Level 1間のリークルーター
version 4.2R2.4;
system {
host-name ida;
domain-name juniper.net;
default-address-selection;
login {
user lunkan {
uid 2001;
class super-user;
authentication {
encrypted-password "$1$Fg/2.$G1YuZUcU6ujXF5fCDlvWQ/"; # SECRET-DATA
}
}
}
services {
telnet;
ssh;
ftp;
}
syslog {
user * {
any emergency;
}
host 192.168.1.10 {
any any;
facility-override local7;
log-prefix ida;
}
file messages {
any notice;
authorization info;
}
}
ntp {
peer 192.168.1.10;
}
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 1.1.0.3/24;
}
family iso;
}
}
fxp1 {
unit 0 {
family inet {
address 1.1.1.245/30;
}
family iso;
}
}
lo0 {
unit 0 {
family inet {
address 1.1.1.3/32;
}
family iso {
address 47.0001.0010.0100.1003.00;
}
}
}
}
routing-options {
router-id 1.1.1.3;
autonomous-system 1111;
}
protocols {
bgp {
traceoptions {
file bgp;
flag state detail;
92
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
flag update;
flag policy;
flag route;
}
log-updown;
group internal {
type internal;
local-address 1.1.1.3;
neighbor 1.1.1.1 {
authentication-key "$9$IW5RSeLxdgoGWLxdwgUD";
}
neighbor 1.1.1.6;
}
group pop_rr {
type internal;
local-address 1.1.1.3;
cluster 1.1.1.5;
neighbor 1.1.1.7;
}
group pop {
type internal;
local-address 1.1.1.3;
neighbor 1.1.1.4;
}
}
isis {
traceoptions {
file isis;
flag state detail;
}
export isis_leak;
lsp-lifetime 65535;
level 2 wide-metrics-only;
interface all;
interface fxp0.0 {
level 1 disable;
}
}
}
policy-options {
policy-statement isis_leak {
term one {
from {
level 2;
route-filter 1.1.1.0/24 longer;
}
then accept;
}
}
}
Copyright © 2001, Juniper Networks, Inc.
93
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
IOS Cisco_border境界ルーター
!
version 12.1
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
no service password-encryption
!
hostname cisco_border
!
aaa new-model
aaa authentication login default none
aaa authentication enable default none
!
!
!
!
!
ip subnet-zero
ip rcmd rsh-enable
ip rcmd remote-host root 192.168.1.10 root enable
no ip finger
ip telnet source-interface Loopback0
ip tftp source-interface Loopback0
ip ftp source-interface Loopback0
ip ftp username root
ip ftp password lunkan
no ip domain-lookup
ip name-server 192.168.1.10
!
ip cef
cns event-service server
!
!
!
!
!
interface Loopback0
ip address 1.1.1.4 255.255.255.255
!
interface Ethernet0
ip address 1.1.0.4 255.255.255.0
ip router isis
!
interface Ethernet1
ip address 194.68.128.3 255.255.255.0
!
interface Serial0
no ip address
shutdown
no fair-queue
!
interface Serial1
no ip address
shutdown
!
router isis
passive-interface Ethernet1
passive-interface Loopback0
net 47.0001.0010.0100.1004.00
is-type level-2-only
metric-style wide
max-lsp-lifetime 65535
94
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
lsp-refresh-interval 65000
spf-interval 10 100 500
prc-interval 5 100 250
lsp-gen-interval 10 20 2500
log-adjacency-changes
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.4
bgp log-neighbor-changes
bgp deterministic-med
bgp dampening route-map damp
aggregate-address 100.100.0.0 255.255.0.0 summary-only
aggregate-address 100.200.0.0 255.255.0.0 summary-only
timers bgp 30 90
neighbor internal peer-group
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor internal next-hop-self
neighbor external peer-group
neighbor external soft-reconfiguration inbound
neighbor external prefix-list martians in
neighbor external route-map int_policy in
neighbor external route-map ext_policy out
neighbor external maximum-prefix 100 70
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.6 peer-group internal
neighbor 194.68.128.22 remote-as 2222
neighbor 194.68.128.22 peer-group external
neighbor 194.68.128.33 remote-as 3333
neighbor 194.68.128.33 peer-group external
no auto-summary
!
ip classless
no ip http server
ip bgp-community new-format
ip community-list 1 permit 1111:5
ip community-list 2 permit 1111:6
ip community-list 3 permit 1111:10
ip as-path access-list 1 permit ^3333$
ip as-path access-list 10 permit ^$
!
!
ip prefix-list martians seq 1 deny 0.0.0.0/32
ip prefix-list martians seq 20 deny 127.0.0.0/8 le 32
ip prefix-list martians seq 30 deny 10.0.0.0/8 le 32
ip prefix-list martians seq 40 deny 172.16.0.0/12 le 32
ip prefix-list martians seq 50 deny 192.168.0.0/16 le 32
!
ip prefix-list root_dns seq 1 permit 198.41.0.0/24
ip prefix-list root_dns seq 2 permit 128.9.0.0/16
ip prefix-list root_dns seq 3 permit 192.33.4.0/24
ip prefix-list root_dns seq 4 permit 128.8.0.0/16
ip prefix-list root_dns seq 5 permit 192.203.230.0/24
ip prefix-list root_dns seq 6 permit 192.5.4.0/23
ip prefix-list root_dns seq 7 permit 192.112.36.0/24
ip prefix-list root_dns seq 8 permit 128.63.0.0/16
ip prefix-list root_dns seq 9 permit 192.36.148.0/24
ip prefix-list root_dns seq 10 permit 193.0.14.0/24
ip prefix-list root_dns seq 11 permit 198.32.64.0/24
ip prefix-list root_dns seq 12 permit 202.12.27.0/24
logging trap debugging
logging source-interface Loopback0
Copyright © 2001, Juniper Networks, Inc.
95
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
logging 192.168.1.10
access-list 10 permit 100.100.0.0 0.0.255.255
access-list 20 permit 100.200.0.0 0.0.255.255
route-map damp deny 1
match as-path 10
!
route-map damp deny 2
match ip address prefix-list root_dns
!
route-map damp permit 3
set dampening 15 750 2000 60
!
route-map int_policy permit 10
match as-path 1
set local-preference 101
!
route-map int_policy permit 20
!
route-map ext_policy permit 10
match ip address 10
set metric 100
set as-path prepend 1111 1111 1111
!
route-map ext_policy permit 20
match ip address 20
set metric 0
!
route-map ext_policy permit 30
match community 1
set metric 100
set as-path prepend 1111 1111 1111
!
route-map ext_policy permit 40
match community 2
set metric 0
!
route-map ext_policy deny 50
match community 3
!
!
!
line con 0
transport input none
line aux 0
line vty 0 4
!
ntp source Loopback0
ntp peer 192.168.1.10
end
96
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
IOS Cisco_core_rrコアルートリフレクタと192.168.2/24ネットワークのアクセスルーター
!
version 12.1
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
no service password-encryption
!
hostname cisco_core_rr
!
boot system flash:b.bin
aaa new-model
aaa authentication login default none
aaa authentication enable default none
!
!
!
!
!
ip subnet-zero
ip ftp source-interface Loopback0
ip ftp username root
ip ftp password lunkan
no ip domain-lookup
ip name-server 192.168.1.10
!
ip dhcp pool core
network 1.1.0.0 255.255.255.0
default-router 1.1.0.1
!
cns event-service server
!
!
!
!
!
interface Loopback0
ip address 1.1.1.6 255.255.255.255
!
interface Loopback1
ip address 192.168.2.1 255.255.255.0
!
interface Ethernet0
ip address 1.1.0.6 255.255.255.0
ip router isis
isis priority 126
!
interface Serial0
no ip address
no ip mroute-cache
shutdown
no fair-queue
!
interface Serial1
no ip address
shutdown
!
!
router isis
passive-interface Loopback0
net 47.0001.0010.0100.1006.00
Copyright © 2001, Juniper Networks, Inc.
97
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
is-type level-2-only
metric-style wide
max-lsp-lifetime 65535
lsp-refresh-interval 65000
spf-interval 10 100 500
prc-interval 5 100 250
lsp-gen-interval 10 20 2500
log-adjacency-changes
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.6
bgp cluster-id 3232236033
bgp log-neighbor-changes
network 192.168.2.0 route-map rfc1918
timers bgp 30 90
redistribute connected
neighbor internal_rr peer-group
neighbor internal_rr remote-as 1111
neighbor internal_rr update-source Loopback0
neighbor internal_rr route-reflector-client
neighbor internal_rr send-community
neighbor internal_rr route-map rfc1918 out
neighbor internal peer-group
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor internal send-community
neighbor internal route-map rfc1918 out
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.2 peer-group internal_rr
neighbor 1.1.1.3 peer-group internal_rr
neighbor 1.1.1.4 peer-group internal_rr
neighbor 1.1.1.5 peer-group internal_rr
no auto-summary
!
ip classless
no ip http server
ip bgp-community new-format
!
logging trap debugging
logging source-interface Loopback0
logging 192.168.1.10
access-list 1 permit 192.168.2.0 0.0.0.255
route-map rfc1918 permit 10
match ip address 1
set community no-export
!
!
!
!
line con 0
transport input none
line aux 0
line 2 3
line vty 0 4
!
ntp source Loopback0
ntp peer 192.168.1.10
!
!
!
end
98
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
IOS Cisco_pop配信/POPルートリフレクタとIS-IS Level 2-Level 1間リークルーター
!
version 12.1
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
no service password-encryption
!
hostname cisco_pop
!
aaa new-model
aaa authentication login default none
aaa authentication enable default none
!
!
!
!
!
ip subnet-zero
ip rcmd rsh-enable
ip rcmd remote-host root 192.168.1.10 root enable
no ip finger
ip telnet source-interface Loopback0
no ip domain-lookup
ip name-server 192.168.1.10
!
ip cef
cns event-service server
!
!
!
!
!
interface Loopback0
ip address 1.1.1.5 255.255.255.255
!
interface Ethernet0
ip address 1.1.0.5 255.255.255.0
ip router isis
isis circuit-type level-2-only
!
interface Serial0
bandwidth 2000000
ip address 1.1.1.249 255.255.255.252
ip router isis
clockrate 2000000
!
interface Serial1
no ip address
shutdown
!
router isis
redistribute isis ip level-2 into level-1 distribute-list 100
passive-interface Loopback0
net 47.0001.0010.0100.1005.00
metric-style wide
max-lsp-lifetime 65535
lsp-refresh-interval 65000
spf-interval 10 100 500
prc-interval 5 100 250
lsp-gen-interval 10 20 2500
Copyright © 2001, Juniper Networks, Inc.
99
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
log-adjacency-changes
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.5
bgp log-neighbor-changes
timers bgp 30 90
neighbor internal peer-group
neighbor internal remote-as 1111
neighbor internal update-source Loopback0
neighbor pop peer-group
neighbor pop remote-as 1111
neighbor pop update-source Loopback0
neighbor pop_rr peer-group
neighbor pop_rr remote-as 1111
neighbor pop_rr update-source Loopback0
neighbor pop_rr route-reflector-client
neighbor 1.1.1.1 peer-group internal
neighbor 1.1.1.6 peer-group internal
neighbor 1.1.1.7 peer-group pop_rr
no auto-summary
!
ip classless
no ip http server
ip bgp-community new-format
!
logging trap debugging
logging source-interface Loopback0
logging 192.168.1.10
access-list 1 permit 1.1.1.0 0.0.0.255
!
!
line con 0
transport input none
line 1 8
line aux 0
line vty 0 4
!
ntp source Loopback0
ntp peer 192.168.1.10
end
100
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
IOS Cisco_accessアクセスIBGPエッジルーター
このコンフィグレーションは、community タグを持つネットワークをプロビジョンします。これは、IS-IS Level
1ルーター用のコンフィグレーションです。
!
version 12.1
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
no service password-encryption
!
hostname cisco_access
!
boot system flash:b.bin
aaa new-model
aaa authentication login default enable none
aaa authentication enable default enable none
!
!
!
!
!
ip subnet-zero
ip ftp source-interface Loopback0
ip ftp username root
ip ftp password lunkan
no ip domain-lookup
!
cns event-service server
!
!
!
!
!
interface Loopback0
ip address 1.1.1.7 255.255.255.255
!
interface Loopback1
ip address 100.100.1.1 255.255.255.255
!
interface Loopback2
ip address 100.100.2.1 255.255.255.255
!
interface Loopback3
ip address 100.200.1.1 255.255.255.255
!
interface Loopback4
ip address 100.200.2.1 255.255.255.255
!
interface Ethernet0
ip address 1.1.1.246 255.255.255.252
ip router isis
!
interface Serial0
ip address 1.1.1.250 255.255.255.252
ip router isis
no ip mroute-cache
no fair-queue
!
interface Serial1
no ip address
shutdown
!
Copyright © 2001, Juniper Networks, Inc.
101
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
router isis
passive-interface Loopback0
net 47.0001.0010.0100.1007.00
is-type level-1
metric-style wide
max-lsp-lifetime 65535
lsp-refresh-interval 65000
spf-interval 10 100 500
prc-interval 5 100 250
lsp-gen-interval 10 20 2500
log-adjacency-changes
!
router bgp 1111
no synchronization
bgp router-id 1.1.1.7
bgp log-neighbor-changes
timers bgp 30 90
redistribute connected route-map access
redistribute static route-map static
neighbor access peer-group
neighbor access remote-as 1111
neighbor access update-source Loopback0
neighbor access send-community
neighbor 1.1.1.3 peer-group access
neighbor 1.1.1.5 peer-group access
no auto-summary
!
ip default-gateway 1.1.1.245
ip classless
ip route 111.111.0.0 255.255.0.0 Null0
ip route 222.222.0.0 255.255.0.0 Null0
no ip http server
ip bgp-community new-format
!
logging trap debugging
logging source-interface Loopback0
logging 192.168.1.10
access-list 1 permit 100.100.1.1
access-list 2 permit 100.100.2.1
access-list 3 permit 100.200.1.1
access-list 4 permit 100.200.2.1
access-list 5 permit 111.111.0.0 0.0.255.255
access-list 6 permit 222.222.0.0 0.0.255.255
route-map access permit 10
match ip address 1
set community 1111:1
!
route-map access permit 20
match ip address 2
set community 1111:2
!
route-map access permit 30
match ip address 3
set community 1111:3
!
route-map access permit 40
match ip address 4
set community 1111:4
!
route-map static permit 10
match ip address 5
set community 1111:5
!
102
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
route-map static permit 20
match ip address 6
set community 1111:6
!
!
!
!
line con 0
transport input none
line aux 0
line 2 3
line vty 0 4
!
!
!
end
Copyright © 2001, Juniper Networks, Inc.
103
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
IOS Pagent外部EBGPルーター
このノーマルモードのコンフィグレーションは、2.2.0.0/16を流入させます。
!
version 12.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname pagent
!
aaa new-model
aaa authentication login default none
aaa authentication enable default none
!
!
!
!
!
ip subnet-zero
no ip domain-lookup
!
cns event-service server
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0
ip address 194.68.128.22 255.255.255.0
!
interface Serial0
no ip address
shutdown
no fair-queue
!
interface Serial1
no ip address
shutdown
!
router bgp 2222
no synchronization
bgp router-id 2.2.2.2
bgp always-compare-med
bgp log-neighbor-changes
bgp deterministic-med
network 2.2.0.0 mask 255.255.0.0
neighbor external peer-group
neighbor external remote-as 1111
neighbor 194.68.128.2 peer-group external
neighbor 194.68.128.3 peer-group external
neighbor 194.68.128.33 remote-as 3333
no auto-summary
!
ip classless
ip route 0.0.0.0 0.0.0.0 194.68.128.2 254
ip route 0.0.0.0 0.0.0.0 194.68.128.3 254
ip route 2.2.0.0 255.255.0.0 Null0
no ip http server
ip bgp-community new-format
!
104
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
!
!
line con 0
exec-timeout 0 0
transport input none
line aux 0
line vty 0 4
!
no scheduler max-task-time
end
Copyright © 2001, Juniper Networks, Inc.
105
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
IOS Dummy外部EBGPルーター
このコンフィグレーションは、3.3.0.0/16とMartianルートを隣接ルーターへ流入させます。
!
version 12.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname dummy
!
aaa new-model
aaa authentication login default none
aaa authentication enable default none
!
!
!
!
!
ip subnet-zero
!
isdn voice-call-failure 0
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
no ip directed-broadcast
!
interface Loopback1
no ip address
no ip directed-broadcast
!
interface Ethernet0
ip address 194.68.128.33 255.255.255.0
no ip directed-broadcast
!
interface Serial0
no ip address
no ip directed-broadcast
no ip mroute-cache
shutdown
no fair-queue
!
interface BRI0
no ip address
no ip directed-broadcast
shutdown
isdn guard-timer 0 on-expiry accept
!
router bgp 3333
no synchronization
bgp router-id 3.3.3.3
bgp always-compare-med
bgp log-neighbor-changes
bgp deterministic-med
network 3.3.0.0 mask 255.255.0.0
network 0.0.0.0
redistribute static metric 1
neighbor external peer-group
106
Copyright © 2001, Juniper Networks, Inc.
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
neighbor external remote-as 1111
neighbor external route-map med out
neighbor 194.68.128.2 peer-group external
neighbor 194.68.128.3 peer-group external
neighbor 194.68.128.22 remote-as 2222
default-information originate
no auto-summary
!
ip classless
ip route 0.0.0.0 0.0.0.0 Null0
ip route 3.3.0.0 255.255.0.0 Null0
ip route 10.0.0.0 255.0.0.0 Null0
no ip http server
ip bgp-community new-format
!
route-map out_tag permit 10
set community 3333:1
!
route-map med permit 10
set metric 1
!
route-map prepend permit 10
set as-path prepend 3333 3333 3333 3333
!
!
line con 0
transport input none
line vty 0 4
!
end
Copyright © 2001, Juniper Networks, Inc.
107
JUNOSインターネットソフトウェアとIOSのコンフィグレーション変換
略語
AS
autonomous system
BGP
Border Gateway Protocol
CEF
Cisco express forwarding
EBGP
exterior border gateway protocol
EGP
exterior gateway protocol
ESI
end system identifier
IBGP
internal border gateway protocol
IGP
interior gateway protocol
IP
Internet Protocol
IS-IS
Intermediate System to Intermediate System
LSP
label switched path
MPLS
Multiprotocol Label Switching
NET
network entity title
NSAP
network service access point
NTP
Network Time Protocol
POP
point of presence
RADIUS
Remote Authentication Dial-in User Service
RFC
Request for Comments
RIP
Routing Information Protocol
RIPE
Reseaux Internet Protocol Europeens
SNMP
Simple Network Management Protocol
TACACS
Terminal Access Controller Access Control System Plus
TCP
Transmission Control Protocol
TLV
type-length-value
VPN
virtual private network
ジュニパーネットワークスの製品とサービス
詳細情報については、以下までお問い合わせください。
ジュニパーネットワークス株式会社
〒163-1035 東京都新宿区西新宿3-7-1
新宿パークタワー N棟 35階
電話
03-5321-2600
FAX
03-5321-2700
URL
http://www.juniper.co.jp
Copyright © 2001, Juniper Networks, Inc. All rights reserved.
Juniper Networksは、米国特許商標庁および他の国々において、Juniper Networks, Inc.の商標として登録されています。インターネットプロセッサ、インターネットプ
ロセッサII、JUNOS、JUNOScript、M5、M10、M20、M40、およびM160は、Juniper Networks, Inc.の商標です。他のすべての商標、サービスマーク、登録商標、
登録サービスマークの所有権は各提供会社に帰属しています。ジュニパーネットワークス社は、本文書内の誤植等の誤りには一切の責任を負いません。
ジュニパーネットワークス社は、通知せずに、本文書の内容を変更、修正、翻訳、または改訂する権利を有しています。
108
Copyright © 2001, Juniper Networks, Inc.
© Copyright 2025 Paperzz