コンフィグレーションガイド
- <この項の構成>
- (1) 設定内容の概要
- (2) 構成図と設定条件
- (3) コンフィグレーション例
(1) 設定内容の概要
AS番号200(AS200),AS番号300(AS300),AS番号400(AS400)およびAS番号500(AS500)の自律システムに接続されたAS番号100の自律システム(AS100)において,AS200およびAS300から広告された経路情報をAS内およびAS400,AS500に配布し,AS400およびAS500から広告された特定ネットワーク宛の経路情報をAS内およびAS200,AS300に配布します。また,AS内のネットワークをスタティック定義し,AS200,AS300,AS400およびAS500に広告します。
(2) 構成図と設定条件
- [構成図]
図9-18 構成図
- [設定条件]
- <本装置A/Bの環境>
- AS200およびAS300のBGP4スピーカと外部ピアによりピアリングします。
- AS内の他のBGP4スピーカと内部ピアによりピアリングします。
- AS200およびAS300から受信した経路および直結経路をAS内に広告します。その際,AS200およびAS300からの経路はAS200を優先します。
- AS400およびAS500からの経路をAS200およびAS300に広告します。また,AS内のネットワークをスタティック定義し,AS200およびAS300に広告します。
- <本装置C/Dの環境>
- AS400およびAS500のBGP4スピーカと外部ピアによりピアリングします。
- AS内の他のBGP4スピーカと内部ピアによりピアリングします。
- AS400およびAS500から受信した特定ネットワーク宛の経路および直結経路をAS内に広告します。
- AS200およびAS300からの経路をAS400およびAS500に広告します。また,AS内のネットワークをスタティック定義し,AS400およびAS500に広告します。
(3) コンフィグレーション例
- [コマンドによる設定]
- <本装置A>
1 (config)# autonomoussystem 100 2 (config)# routerid 172.16.2.1 3 (config)# bgp yes [bgp] 4 (config)# externalpeeras 200 [bgp externalpeeras 200] 5 (config)# peer 172.17.1.1 [bgp externalpeeras 200 peer 172.17.1.1] 6 (config)# exit [bgp externalpeeras 200] 7 (config)# exit [bgp] 8 (config)# internalpeeras 100 [bgp internalpeeras 100] 9 (config)# peer 172.16.1.4 [bgp internalpeeras 100 peer 172.16.1.4] 10 (config)# exit [bgp internalpeeras 100] 11 (config)# peer 172.16.1.8 [bgp internalpeeras 100 peer 172.16.1.8] 12 (config)# exit [bgp internalpeeras 100] 13 (config)# peer 172.16.1.12 [bgp internalpeeras 100 peer 172.16.1.12] 14 (config)# exit [bgp internalpeeras 100] 15 (config)# exit [bgp] 16 (config)# exit 17 (config)# attribute-list set-attribute 10 [attribute-list set-attribute 10] 18 (config)# localpref 300 [attribute-list set-attribute 10] 19 (config)# exit 20 (config)# import proto bgp as 200 set-attribute 10 [import proto bgp as 200 set-attribute 10] 21 (config)# exit 22 (config)# export proto bgp as 100 [export proto bgp as 100] 23 (config)# proto direct [export proto bgp as 100 proto direct] 24 (config)# exit [export proto bgp as 100] 25 (config)# proto bgp as 200 [export proto bgp as 100 proto bgp as 200] 26 (config)# exit [export proto bgp as 100] 27 (config)# exit 28 (config)# static [static] 29 (config)# 172.16.0.0 masklen 16 interface null [static] 30 (config)# exit 31 (config)# export proto bgp as 200 [export proto bgp as 200] 32 (config)# proto static [export proto bgp as 200 proto static] 33 (config)# exit [export proto bgp as 200] 34 (config)# proto bgp peer 172.16.1.8 [export proto bgp as 200 proto bgp peer 172.16.1.8] 35 (config)# exit [export proto bgp as 200] 36 (config)# proto bgp peer 172.16.1.12 [export proto bgp as 200 proto bgp peer 172.16.1.12] 37 (config)# exit [export proto bgp as 200] 38 (config)# exit表9-62 本装置Aのコンフィグレーション解説
解説番号 解説 1 自装置の属するAS番号を定義します。 2 自装置のルータIDを定義します。 3〜7 BGP4プロトコルを動作させることを定義します。また,AS200に対する外部ピアを定義します。 8〜16 本装置B,C,Dへの内部ピアを定義します。 17〜21 AS200から受信した経路のLOCALPREF値を300にするよう定義します。 22〜27 AS200から受信した経路,直結経路をAS内の内部ピアに広告するよう定義します。 28〜30 AS内のネットワークをスタティック経路として定義します。 31〜38 生成したスタティック経路,AS400から受信した経路,AS500から受信した経路をAS200との外部ピアに広告するよう定義します。
- <本装置B>
1 (config)# autonomoussystem 100 2 (config)# routerid 172.16.2.2 3 (config)# bgp yes [bgp] 4 (config)# externalpeeras 300 [bgp externalpeeras 300] 5 (config)# peer 172.18.1.1 [bgp externalpeeras 300 peer 172.18.1.1] 6 (config)# exit [bgp externalpeeras 300] 7 (config)# exit [bgp] 8 (config)# internalpeeras 100 [bgp internalpeeras 100] 9 (config)# peer 172.16.1.3 [bgp internalpeeras 100 peer 172.16.1.3] 10 (config)# exit [bgp internalpeeras 100] 11 (config)# peer 172.16.1.14 [bgp internalpeeras 100 peer 172.16.1.14] 12 (config)# exit [bgp internalpeeras 100] 13 (config)# peer 172.16.1.10 [bgp internalpeeras 100 peer 172.16.1.10] 14 (config)# exit [bgp internalpeeras 100] 15 (config)# exit [bgp] 16 (config)# exit 17 (config)# attribute-list set-attribute 10 [attribute-list set-attribute 10] 18 (config)# localpref 200 [attribute-list set-attribute 10] 19 (config)# exit 20 (config)# import proto bgp as 300 set-attribute 10 [import proto bgp as 300 set-attribute 10] 21 (config)# exit 22 (config)# export proto bgp as 100 [export proto bgp as 100] 23 (config)# proto direct [export proto bgp as 100 proto direct] 24 (config)# exit [export proto bgp as 100] 25 (config)# proto bgp as 300 [export proto bgp as 100 proto bgp as 300] 26 (config)# exit [export proto bgp as 100] 27 (config)# exit 28 (config)# static [static] 29 (config)# 172.16.0.0 masklen 16 interface null [static] 30 (config)# exit 31 (config)# export proto bgp as 300 [export proto bgp as 300] 32 (config)# proto static [export proto bgp as 300 proto static] 33 (config)# exit [export proto bgp as 300] 34 (config)# proto bgp peer 172.16.1.10 [export proto bgp as 300 proto bgp peer 172.16.1.10] 35 (config)# exit [export proto bgp as 300] 36 (config)# proto bgp peer 172.16.1.14 [export proto bgp as 300 proto bgp peer 172.16.1.14] 37 (config)# exit [export proto bgp as 300] 38 (config)# exit表9-63 本装置Bのコンフィグレーション解説
解説番号 解説 1 自装置の属するAS番号を定義します。 2 自装置のルータIDを定義します。 3〜7 BGP4プロトコルを動作させることを定義します。また,AS300に対する外部ピアを定義します。 8〜16 本装置A,C,Dへの内部ピアを定義します。 17〜21 AS300から受信した経路のLOCALPREF値を200にするよう定義します。 22〜27 AS300から受信した経路,直結経路をAS内の内部ピアに広告するよう定義します。 28〜30 AS内のネットワークをスタティック経路として定義します。 31〜38 生成したスタティック経路,AS400から受信した経路,AS500から受信した経路をAS300との外部ピアに広告するよう定義します。
- <本装置C>
1 (config)# autonomoussystem 100 2 (config)# routerid 172.16.2.3 3 (config)# bgp yes [bgp] 4 (config)# externalpeeras 400 [bgp externalpeeras 400] 5 (config)# peer 172.19.1.1 [bgp externalpeeras 400 peer 172.19.1.1] 6 (config)# exit [bgp externalpeeras 400] 7 (config)# exit [bgp] 8 (config)# internalpeeras 100 [bgp internalpeeras 100] 9 (config)# peer 172.16.1.7 [bgp internalpeeras 100 peer 172.16.1.7] 10 (config)# exit [bgp internalpeeras 100] 11 (config)# peer 172.16.1.13 [bgp internalpeeras 100 peer 172.16.1.13] 12 (config)# exit [bgp internalpeeras 100] 13 (config)# peer 172.16.1.6 [bgp internalpeeras 100 peer 172.16.1.6] 14 (config)# exit [bgp internalpeeras 100] 15 (config)# exit [bgp] 16 (config)# exit 17 (config)# attribute-list attribute-filter 10 [attribute-list attribute-filter 10] 18 (config)# aspath-regexp "^400$" [attribute-list attribute-filter 10] 19 (config)# exit 20 (config)# attribute-list set-attribute 10 [attribute-list set-attribute 10] 21 (config)# localpref 400 [attribute-list set-attribute 10] 22 (config)# exit 23 (config)# import proto bgp as 400 attribute-filter 10 set-attribute 10 [import proto bgp as 400 attribute-filter 10 set-attribute 10] 24 (config)# 192.19.0.0 masklen 16 [import proto bgp as 400 attribute-filter 10 set-attribute 10] 25 (config)# exit 26 (config)# import proto bgp as 400 restrict 27 (config)# export proto bgp as 100 [export proto bgp as 100] 28 (config)# proto direct [export proto bgp as 100 proto direct] 29 (config)# exit [export proto bgp as 100] 30 (config)# proto bgp as 400 [export proto bgp as 100 proto bgp as 400] 31 (config)# exit [export proto bgp as 100] 32 (config)# exit 33 (config)# static [static] 34 (config)# 172.16.0.0 masklen 16 interface null [static] 35 (config)# exit 36 (config)# export proto bgp as 400 [export proto bgp as 400] 37 (config)# proto static [export proto bgp as 400 proto static] 38 (config)# exit [export proto bgp as 400] 39 (config)# proto bgp as 100 [export proto bgp as 400 proto bgp as 100] 40 (config)# exit [export proto bgp as 400] 41 (config)# exit表9-64 本装置Cのコンフィグレーション解説
解説番号 解説 1 自装置の属するAS番号を定義します。 2 自装置のルータIDを定義します。 3〜7 BGP4プロトコルを動作させることを定義します。また,AS400に対する外部ピアを定義します。 8〜16 本装置A,B,Dへの内部ピアを定義します。 17〜26 AS400から受信する経路をASPATH:400,ネットワーク:192.19.0.0/16に限定し,当該経路のLOCALPREF値を400にするよう定義します。 27〜32 AS400から受信した経路,直結経路をAS内の内部ピアに広告するよう定義します。 33〜35 AS内のネットワークをスタティック経路として定義します。 36〜41 生成したスタティック経路,AS200,AS300,AS500から受信した経路をAS400との外部ピアに広告するよう定義します。
- <本装置D>
1 (config)# autonomoussystem 100 2 (config)# routerid 172.16.2.4 3 (config)# bgp yes [bgp] 4 (config)# externalpeeras 500 [bgp externalpeeras 500] 5 (config)# peer 172.20.1.1 [bgp externalpeeras 500 peer 172.20.1.1] 6 (config)# exit [bgp externalpeeras 500] 7 (config)# exit [bgp] 8 (config)# internalpeeras 100 [bgp internalpeeras 100] 9 (config)# peer 172.16.1.11 [bgp internalpeeras 100 peer 172.16.1.11] 10 (config)# exit [bgp internalpeeras 100] 11 (config)# peer 172.16.1.9 [bgp internalpeeras 100 peer 172.16.1.9] 12 (config)# exit [bgp internalpeeras 100] 13 (config)# peer 172.16.1.5 [bgp internalpeeras 100 peer 172.16.1.5] 14 (config)# exit [bgp internalpeeras 100] 15 (config)# exit [bgp] 16 (config)# exit 17 (config)# attribute-list attribute-filter 10 [attribute-list attribute-filter 10] 18 (config)# aspath-regexp "^500$" [attribute-list attribute-filter 10] 19 (config)# exit 20 (config)# attribute-list set-attribute 10 [attribute-list set-attribute 10] 21 (config)# localpref 400 [attribute-list set-attribute 10] 22 (config)# exit 23 (config)# import proto bgp as 500 attribute-filter 10 set-attribute 10 [import proto bgp as 500 attribute-filter 10 set-attribute 10] 24 (config)# 192.20.0.0 masklen 16 [import proto bgp as 500 attribute-filter 10 set-attribute 10] 25 (config)# exit 26 (config)# import proto bgp as 500 restrict 27 (config)# export proto bgp as 100 [export proto bgp as 100] 28 (config)# proto direct [export proto bgp as 100 proto direct] 29 (config)# exit [export proto bgp as 100] 30 (config)# proto bgp as 500 [export proto bgp as 100 proto bgp as 500] 31 (config)# exit [export proto bgp as 100] 32 (config)# exit 33 (config)# static [static] 34 (config)# 172.16.0.0 masklen 16 interface null [static] 35 (config)# exit 36 (config)# export proto bgp as 500 [export proto bgp as 500] 37 (config)# proto static [export proto bgp as 500 proto static] 38 (config)# exit [export proto bgp as 500] 39 (config)# proto bgp as 100 [export proto bgp as 500 proto bgp as 100] 40 (config)# exit [export proto bgp as 500] 41 (config)# exit表9-65 本装置Dのコンフィグレーション解説
解説番号 解説 1 自装置の属するAS番号を定義します。 2 自装置のルータIDを定義します。 3〜7 BGP4プロトコルを動作させることを定義します。また,AS500に対する外部ピアを定義します。 8〜16 本装置A,B,Cへの内部ピアを定義します。 17〜26 AS500から受信する経路をASPATH:500,ネットワーク:192.20.0.0/16に限定し,当該経路のLOCALPREF値を400にするよう定義します。 27〜32 AS500から受信した経路,直結経路をAS内の内部ピアに広告するよう定義します。 33〜35 AS内のネットワークをスタティック経路として定義します。 36〜41 生成したスタティック経路,AS200,AS300,AS400から受信した経路をAS500との外部ピアに広告するよう定義します。
- [コンフィグレーションの表示]
- <本装置A>
autonomoussystem 100 ! routerid 172.16.2.1 ! bgp yes internalpeeras 100 peer 172.16.1.4 peer 172.16.1.8 peer 172.16.1.12 externalpeeras 200 peer 172.17.1.1 ! static 172.16.0.0 masklen 16 interface null ! attribute-list set-attribute 10 localpref 300 ! import proto bgp as 200 set-attribute 10 ! export proto bgp as 100 proto direct proto bgp as 200 ! export proto bgp as 200 proto static proto bgp peer 172.16.1.8 proto bgp peer 172.16.1.12
- <本装置B>
autonomoussystem 100 ! routerid 172.16.2.2 ! bgp yes internalpeeras 100 peer 172.16.1.3 peer 172.16.1.10 peer 172.16.1.14 externalpeeras 300 peer 172.18.1.1 ! static 172.16.0.0 masklen 16 interface null ! attribute-list set-attribute 10 localpref 200 ! import proto bgp as 300 set-attribute 10 ! export proto bgp as 100 proto direct proto bgp as 300 ! export proto bgp as 300 proto static proto bgp peer 172.16.1.10 proto bgp peer 172.16.1.14
- <本装置C>
autonomoussystem 100 ! routerid 172.16.2.3 ! bgp yes internalpeeras 100 peer 172.16.1.6 peer 172.16.1.7 peer 172.16.1.13 externalpeeras 400 peer 172.19.1.1 ! static 172.16.0.0 masklen 16 interface null ! attribute-list set-attribute 10 localpref 400 ! attribute-list attribute-filter 10 aspath-regexp "^400$" ! import proto bgp as 400 attribute-filter 10 set-attribute 10 192.19.0.0 masklen 16 ! import proto bgp as 400 restrict ! export proto bgp as 100 proto direct proto bgp as 400 ! export proto bgp as 400 proto static proto bgp as 100
- <本装置D>
autonomoussystem 100 ! routerid 172.16.2.4 ! bgp yes internalpeeras 100 peer 172.16.1.5 peer 172.16.1.9 peer 172.16.1.11 externalpeeras 500 peer 172.20.1.1 ! static 172.16.0.0 masklen 16 interface null ! attribute-list set-attribute 10 localpref 400 ! attribute-list attribute-filter 10 aspath-regexp "^500$" ! import proto bgp as 500 attribute-filter 10 set-attribute 10 192.20.0.0 masklen 16 ! import proto bgp as 500 restrict ! export proto bgp as 100 proto direct proto bgp as 500 ! export proto bgp as 500 proto static proto bgp as 100
Copyright (c)2005, 2011, ALAXALA Networks Corporation. All rights reserved.