atwiki-logo
  • 新規作成
    • 新規ページ作成
    • 新規ページ作成(その他)
      • このページをコピーして新規ページ作成
      • このウィキ内の別ページをコピーして新規ページ作成
      • このページの子ページを作成
    • 新規ウィキ作成
  • 編集
    • ページ編集
    • ページ編集(簡易版)
    • ページ名変更
    • メニュー非表示でページ編集
    • ページの閲覧/編集権限変更
    • ページの編集モード変更
    • このページにファイルをアップロード
    • メニューを編集
    • 右メニューを編集
  • バージョン管理
    • 最新版変更点(差分)
    • 編集履歴(バックアップ)
    • アップロードファイル履歴
    • ページ操作履歴
  • ページ一覧
    • ページ一覧
    • このウィキのタグ一覧
    • このウィキのタグ(更新順)
    • おまかせページ移動
  • RSS
    • このウィキの更新情報RSS
    • このウィキ新着ページRSS
  • ヘルプ
    • ご利用ガイド
    • Wiki初心者向けガイド(基本操作)
    • このウィキの管理者に連絡
    • 運営会社に連絡(不具合、障害など)
ページ検索 メニュー
DynagenでCCIEを目指す
  • ウィキ募集バナー
  • 目安箱バナー
  • 操作ガイド
  • 新規作成
  • 編集する
  • 全ページ一覧
  • 登録/ログイン
ページ一覧
DynagenでCCIEを目指す
  • ウィキ募集バナー
  • 目安箱バナー
  • 操作ガイド
  • 新規作成
  • 編集する
  • 全ページ一覧
  • 登録/ログイン
ページ一覧
DynagenでCCIEを目指す
ページ検索 メニュー
  • 新規作成
  • 編集する
  • 登録/ログイン
  • 管理メニュー
管理メニュー
  • 新規作成
    • 新規ページ作成
    • 新規ページ作成(その他)
      • このページをコピーして新規ページ作成
      • このウィキ内の別ページをコピーして新規ページ作成
      • このページの子ページを作成
    • 新規ウィキ作成
  • 編集
    • ページ編集
    • ページ編集(簡易版)
    • ページ名変更
    • メニュー非表示でページ編集
    • ページの閲覧/編集権限変更
    • ページの編集モード変更
    • このページにファイルをアップロード
    • メニューを編集
    • 右メニューを編集
  • バージョン管理
    • 最新版変更点(差分)
    • 編集履歴(バックアップ)
    • アップロードファイル履歴
    • ページ操作履歴
  • ページ一覧
    • このウィキの全ページ一覧
    • このウィキのタグ一覧
    • このウィキのタグ一覧(更新順)
    • このページの全コメント一覧
    • このウィキの全コメント一覧
    • おまかせページ移動
  • RSS
    • このwikiの更新情報RSS
    • このwikiの新着ページRSS
  • ヘルプ
    • ご利用ガイド
    • Wiki初心者向けガイド(基本操作)
    • このウィキの管理者に連絡
    • 運営会社に連絡する(不具合、障害など)
  • atwiki
  • DynagenでCCIEを目指す
  • トップページ
  • 動作検証 ネットワーク系
  • 20100601 BGP AS_PATHに基づくmetric制御

DynagenでCCIEを目指す

20100601 BGP AS_PATHに基づくmetric制御

最終更新:2010年06月06日 22:34

it_certification

- view
管理者のみ編集可
  • 目的
  • 構成
  • 検証1 BGPの基本設定
  • 検証2 複数ISPの再現
  • 検証3 AS_PATHによるmetricの制御
  • 検証4 デフォルトルート

目的

  • BGPとIGPを連携をする方法を確認します。

構成

  • 設定概要
    • LAN内はOSPFによってルーティングします。
    • R2, ISP10とR3, ISP10の間でeBGP neighborを確立します。
  • 構成図
  • netファイル
model = 3620
[localhost]
	
	[[3620]]
		image = C:\Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin
		ram = 128
	
	[[ROUTER R1]]
		f0/0 = LAN 1
		
	[[ROUTER R2]]
		f0/0 = LAN 1
		f1/0 = LAN 2

	[[ROUTER R3]]
		f0/0 = LAN 1
		f1/0 = LAN 2

	[[ROUTER ISP10]]
		f1/0 = LAN 2
  • 初期設定 R1
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 network 192.168.1.1 0.0.0.0 area 0
!
ip http server
ip classless
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
  • 初期設定 R2
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.1.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.2 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 network 192.168.1.2 0.0.0.0 area 0
!
ip http server
ip classless
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
  • 初期設定 R3
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.1.3 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.3 255.255.255.0
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 network 192.168.1.3 0.0.0.0 area 0
!
ip http server
ip classless
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
  • 初期設定 ISP10
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ISP10
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 11.11.11.11 255.255.255.255 secondary
 ip address 22.22.22.22 255.255.255.255 secondary
 ip address 33.33.33.33 255.255.255.255 secondary
 ip address 10.10.10.10 255.255.255.255
!
interface FastEthernet1/0
 ip address 192.168.2.10 255.255.255.0
 duplex auto
 speed auto
!
ip http server
ip classless
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end

検証1 BGPの基本設定

  • BGPの設定
R2, ISP10とR3, ISP10の間でBGP neighborを確立します。
R2(config)#router bgp 1
R2(config-router)#neighbor 192.168.2.10 remote-as 2

R3(config)#router bgp 1
R3(config-router)#neighbor 192.168.2.10 remote-as 2

ISP10(config)#router bgp 2
ISP10(config-router)#neighbor 192.168.2.2 remote-as 1
ISP10(config-router)#neighbor 192.168.2.3 remote-as 1
ISP10(config-router)#network 11.11.11.11 mask 255.255.255.255
ISP10(config-router)#network 22.22.22.22 mask 255.255.255.255
ISP10(config-router)#network 33.33.33.33 mask 255.255.255.255
  • BGPの確認
R2, R3でBGPによる経路通知ができているかを確認します。
R2#show ip bgp summary
BGP router identifier 2.2.2.2, local AS number 1
BGP table version is 4, main routing table version 4
3 network entries using 303 bytes of memory
3 path entries using 144 bytes of memory
1 BGP path attribute entries using 60 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 531 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.2.10    4     2       5       5        4    0    0 00:01:30        3
R2#
R2#
R2#
R2#show ip route bgp
     33.0.0.0/32 is subnetted, 1 subnets
B       33.33.33.33 [20/0] via 192.168.2.10, 00:00:48
     22.0.0.0/32 is subnetted, 1 subnets
B       22.22.22.22 [20/0] via 192.168.2.10, 00:00:48
     11.0.0.0/32 is subnetted, 1 subnets
B       11.11.11.11 [20/0] via 192.168.2.10, 00:00:48
R2#

検証2 複数ISPの再現

  • AS_PATHの設定
Dynagenでは複数ASを経由するような大規模なネットワークのテストは難しいです。そこで、route-mapを使用して複数ASを経由したルートを再現します。
ISP10(config)#access-list 11 permit 11.11.11.11
ISP10(config)#access-list 22 permit 22.22.22.22
ISP10(config)#access-list 33 permit 33.33.33.33
ISP10(config)#
ISP10(config)#
ISP10(config)#route-map SET_AS_PATH permit 10
ISP10(config-route-map)#match ip address 11
ISP10(config-route-map)#set as-path prepend 10
ISP10(config-route-map)#exit
ISP10(config)#route-map SET_AS_PATH permit 20
ISP10(config-route-map)#match ip address 22
ISP10(config-route-map)#set as-path prepend 20
ISP10(config-route-map)#exit
ISP10(config)#route-map SET_AS_PATH permit 30
ISP10(config-route-map)#match ip address 33
ISP10(config-route-map)#set as-path prepend 30
ISP10(config-route-map)#exit
ISP10(config)#route-map SET_AS_PATH permit 40
ISP10(config-route-map)#exit
ISP10(config)#
ISP10(config)#
ISP10(config)#router bgp 2
ISP10(config-router)#neighbor 192.168.2.2 route-map SET_AS_PATH out
ISP10(config-router)#neighbor 192.168.2.3 route-map SET_AS_PATH out
  • ルートの再送信
以下のコマンドで、BGPで通知するルートを再送信します。
ISP10#clear ip bgp * out
  • AS_PATHの確認
show ip bgpコマンドで、AS_PATHを確認します。
R2#show ip bgp
BGP table version is 7, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 11.11.11.11/32   192.168.2.10             0             0 2 10 i
*> 22.22.22.22/32   192.168.2.10             0             0 2 20 i
*> 33.33.33.33/32   192.168.2.10             0             0 2 30 i
R2#

検証3 AS_PATHによるmetricの制御

  • 設定概要
AS_PATHによりロードバランスをしたり主系・待機系の切替をしたりする事ができます。
以下の設定では、AS10を含むルートはR2経由、AS20を含むルートはR3経由になるように制御します。また、AS10, AS20を含まないものはロードバランスするようにします。
  • R2の設定
R2に以下の設定を投入します。
R2(config)#ip as-path access-list 10 permit .*_10_.*
R2(config)#ip as-path access-list 20 permit .*_20_.*
R2(config)#
R2(config)#
R2(config)#route-map BGP2OSPF permit 10
R2(config-route-map)#match as-path 10
R2(config-route-map)#set metric 50
R2(config-route-map)#exit
R2(config)#route-map BGP2OSPF permit 20
R2(config-route-map)#match as-path 20
R2(config-route-map)#set metric 100
R2(config-route-map)#exit
R2(config)#route-map BGP2OSPF permit 30
R2(config-route-map)#set metric 20
R2(config-route-map)#exit
R2(config)#
R2(config)#
R2(config)#router ospf 1
R2(config-router)#redistribute bgp 1 route-map BGP2OSPF subnets

  • R3の設定
R3に以下の設定を投入します。
R3(config)#ip as-path access-list 10 permit .*_10_.*
R3(config)#ip as-path access-list 20 permit .*_20_.*
R3(config)#
R3(config)#
R3(config)#
R3(config)#route-map BGP2OSPF permit 10
R3(config-route-map)#match as-path 10
R3(config-route-map)#set metric 100
R3(config-route-map)#exit
R3(config)#route-map BGP2OSPF permit 20
R3(config-route-map)#match as-path 20
R3(config-route-map)#set metric 50
R3(config-route-map)#exit
R3(config)#route-map BGP2OSPF permit 30
R3(config-route-map)#set metric 20
R3(config-route-map)#exit
R3(config)#
R3(config)#
R3(config)#
R3(config)#router ospf 1
R3(config-router)#redistribute bgp 1 route-map BGP2OSPF subnets

  • ルーティングテーブルの確認
AS10経由である11.11.11.11がR2経由で、AS20経由である22.22.22.22がR3経由である事が読み取れます。また、33.33.33.33はロードバランスされている事も分かります。
R1#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     33.0.0.0/32 is subnetted, 1 subnets
O E2    33.33.33.33 [110/20] via 192.168.1.2, 00:00:05, FastEthernet0/0 <- ロードバランス
                    [110/20] via 192.168.1.3, 00:00:05, FastEthernet0/0 <- ロードバランス
     22.0.0.0/32 is subnetted, 1 subnets
O E2    22.22.22.22 [110/50] via 192.168.1.3, 00:00:05, FastEthernet0/0 <- R3経由
     11.0.0.0/32 is subnetted, 1 subnets
O E2    11.11.11.11 [110/50] via 192.168.1.2, 00:00:05, FastEthernet0/0 <- R2経由
C    192.168.1.0/24 is directly connected, FastEthernet0/0
R1#

検証4 デフォルトルート

  • デフォルトルートの設定
デフォルトルートの設定をR2, R3に対して施します。なお、alwaysオプションは、「ルーティングテーブル上にデフォルトルートがなくても、デフォルトルートを他のルータに通知する」という意味です。
R2(config)#router ospf 1
R2(config-router)#default-information  originate always metric 50

R3(config)#router ospf 1
R3(config-router)#default-information  originate always metric 100
  • ルーティングテーブルの確認
R1にデフォルトルートが通知されている事を確認します。
R1#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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 192.168.1.2 to network 0.0.0.0

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     33.0.0.0/32 is subnetted, 1 subnets
O E2    33.33.33.33 [110/20] via 192.168.1.2, 00:02:08, FastEthernet0/0
                    [110/20] via 192.168.1.3, 00:02:08, FastEthernet0/0
     22.0.0.0/32 is subnetted, 1 subnets
O E2    22.22.22.22 [110/50] via 192.168.1.3, 00:02:08, FastEthernet0/0
     11.0.0.0/32 is subnetted, 1 subnets
O E2    11.11.11.11 [110/50] via 192.168.1.2, 00:02:08, FastEthernet0/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
O*E2 0.0.0.0/0 [110/50] via 192.168.1.2, 00:00:06, FastEthernet0/0
R1#
「20100601 BGP AS_PATHに基づくmetric制御」をウィキ内検索
LINE
シェア
Tweet
添付ファイル
  • topology.jpg
DynagenでCCIEを目指す
記事メニュー

メインコンテンツ

  • トップページ
  • トップページ/動作検証 ネットワーク系

更新履歴

取得中です。

@Wiki

  • @wiki
  • @wikiご利用ガイド
  • プラグイン紹介
  • まとめサイト作成支援ツール




ここを編集
記事メニュー2
人気記事ランキング
  1. トップページ/動作検証 ネットワーク系/20100804 NTP
  2. トップページ/手順書 ネットワーク系/VLC media player (Windows版) 操作手順
  3. トップページ/動作検証 ネットワーク系/CBAC 基本設定
  4. トップページ/動作検証 ネットワーク系/20100428 OSPFv3 基本設定
  5. トップページ/動作検証 ネットワーク系/Frame Relay Dynagenを使用した設定例
  6. トップページ/動作検証 ネットワーク系/20100621 BGP タイマーの調節
  7. トップページ/動作検証 ネットワーク系/20100818 EEM applet
  8. トップページ/動作検証 ネットワーク系/ミラーポートの設定
もっと見る
最近更新されたページ
  • 2986日前

    トップページ
  • 4185日前

    トップページ/手順書 ネットワーク系/Loopbackインターフェースとの接続
  • 4186日前

    トップページ/手順書 ネットワーク系
  • 4186日前

    トップページ/手順書 開発系
  • 4186日前

    トップページ/手順書 サーバ系
  • 4186日前

    トップページ/動作検証 ネットワーク系
  • 4899日前

    トップページ/動作検証 ネットワーク系/INE Workbook Volume II lab 15
  • 4920日前

    トップページ/動作検証 ネットワーク系/INE Workbook Volume II lab 14
  • 4933日前

    メニュー
  • 4943日前

    トップページ/動作検証 ネットワーク系/INE Workbook Volume II lab 13
もっと見る
人気記事ランキング
  1. トップページ/動作検証 ネットワーク系/20100804 NTP
  2. トップページ/手順書 ネットワーク系/VLC media player (Windows版) 操作手順
  3. トップページ/動作検証 ネットワーク系/CBAC 基本設定
  4. トップページ/動作検証 ネットワーク系/20100428 OSPFv3 基本設定
  5. トップページ/動作検証 ネットワーク系/Frame Relay Dynagenを使用した設定例
  6. トップページ/動作検証 ネットワーク系/20100621 BGP タイマーの調節
  7. トップページ/動作検証 ネットワーク系/20100818 EEM applet
  8. トップページ/動作検証 ネットワーク系/ミラーポートの設定
もっと見る
最近更新されたページ
  • 2986日前

    トップページ
  • 4185日前

    トップページ/手順書 ネットワーク系/Loopbackインターフェースとの接続
  • 4186日前

    トップページ/手順書 ネットワーク系
  • 4186日前

    トップページ/手順書 開発系
  • 4186日前

    トップページ/手順書 サーバ系
  • 4186日前

    トップページ/動作検証 ネットワーク系
  • 4899日前

    トップページ/動作検証 ネットワーク系/INE Workbook Volume II lab 15
  • 4920日前

    トップページ/動作検証 ネットワーク系/INE Workbook Volume II lab 14
  • 4933日前

    メニュー
  • 4943日前

    トップページ/動作検証 ネットワーク系/INE Workbook Volume II lab 13
もっと見る
ウィキ募集バナー
新規Wikiランキング

最近作成されたWikiのアクセスランキングです。見るだけでなく加筆してみよう!

  1. MadTown GTA (Beta) まとめウィキ
  2. R.E.P.O. 日本語解説Wiki
  3. AviUtl2のWiki
  4. 機動戦士ガンダム EXTREME VS.2 INFINITEBOOST wiki
  5. シュガードール情報まとめウィキ
  6. ソードランページ @ 非公式wiki
  7. SYNDUALITY Echo of Ada 攻略 ウィキ
  8. シミュグラ2Wiki(Simulation Of Grand2)GTARP
  9. 星飼いの詩@ ウィキ
  10. ドラゴンボール Sparking! ZERO 攻略Wiki
もっと見る
人気Wikiランキング

atwikiでよく見られているWikiのランキングです。新しい情報を発見してみよう!

  1. アニヲタWiki(仮)
  2. ストグラ まとめ @ウィキ
  3. ゲームカタログ@Wiki ~名作からクソゲーまで~
  4. 初音ミク Wiki
  5. 機動戦士ガンダム バトルオペレーション2攻略Wiki 3rd Season
  6. MadTown GTA (Beta) まとめウィキ
  7. 検索してはいけない言葉 @ ウィキ
  8. 発車メロディーwiki
  9. オレカバトル アプリ版 @ ウィキ
  10. Grand Theft Auto V(グランドセフトオート5)GTA5 & GTAオンライン 情報・攻略wiki
もっと見る
全体ページランキング

最近アクセスの多かったページランキングです。話題のページを見に行こう!

  1. 参加者一覧 - ストグラ まとめ @ウィキ
  2. 魔獣トゲイラ - バトルロイヤルR+α ファンフィクション(二次創作など)総合wiki
  3. ロスサントス警察 - ストグラ まとめ @ウィキ
  4. ダギ・イルス - 機動戦士ガンダム バトルオペレーション2攻略Wiki 3rd Season
  5. 光の黄金櫃(遊戯王OCG) - アニヲタWiki(仮)
  6. 召喚 - PATAPON(パタポン) wiki
  7. ステージ - PATAPON(パタポン) wiki
  8. 美食神アカシア - アニヲタWiki(仮)
  9. 可愛い逃亡者(トムとジェリー) - アニヲタWiki(仮)
  10. 箱入り娘(パズル) - アニヲタWiki(仮)
もっと見る

  • このWikiのTOPへ
  • 全ページ一覧
  • アットウィキTOP
  • 利用規約
  • プライバシーポリシー

2019 AtWiki, Inc.