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. トップページ/動作検証 ネットワーク系/20100621 BGP タイマーの調節
  2. トップページ/動作検証 ネットワーク系/CBAC 基本設定
  3. トップページ/動作検証 ネットワーク系/http server management
  4. トップページ/動作検証 ネットワーク系/tcp intercept
  5. トップページ/動作検証 ネットワーク系/INE Mock lab 02
  6. トップページ/動作検証 ネットワーク系/20100825 HSRP
  7. トップページ/動作検証 ネットワーク系/INE Workbook Volume I Bridging Switching
  8. トップページ/動作検証 ネットワーク系/20100813 IP SAL
  9. トップページ/動作検証 ネットワーク系/20100512 ODR(On-Demand Routing)
  10. トップページ/動作検証 ネットワーク系/20100605 BGP トランジットAS フルメッシュ構成
もっと見る
最近更新されたページ
  • 3033日前

    トップページ
  • 4232日前

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

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

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

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

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

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

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

    メニュー
  • 4990日前

    トップページ/動作検証 ネットワーク系/INE Workbook Volume II lab 13
もっと見る
人気記事ランキング
  1. トップページ/動作検証 ネットワーク系/20100621 BGP タイマーの調節
  2. トップページ/動作検証 ネットワーク系/CBAC 基本設定
  3. トップページ/動作検証 ネットワーク系/http server management
  4. トップページ/動作検証 ネットワーク系/tcp intercept
  5. トップページ/動作検証 ネットワーク系/INE Mock lab 02
  6. トップページ/動作検証 ネットワーク系/20100825 HSRP
  7. トップページ/動作検証 ネットワーク系/INE Workbook Volume I Bridging Switching
  8. トップページ/動作検証 ネットワーク系/20100813 IP SAL
  9. トップページ/動作検証 ネットワーク系/20100512 ODR(On-Demand Routing)
  10. トップページ/動作検証 ネットワーク系/20100605 BGP トランジットAS フルメッシュ構成
もっと見る
最近更新されたページ
  • 3033日前

    トップページ
  • 4232日前

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

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

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

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

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

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

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

    メニュー
  • 4990日前

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

急上昇中のWikiランキングです。今注目を集めている話題をチェックしてみよう!

  1. シミュグラ2Wiki(Simulation Of Grand2)GTARP
  2. 発車メロディーwiki
  3. 機動戦士ガンダム バトルオペレーション2攻略Wiki 3rd Season
  4. ジョジョの奇妙な冒険 7人目のスタンド使い攻略wiki
  5. ダイナマイト野球3D
  6. シュガードール情報まとめウィキ
  7. Rainbow Six:Siege WIKI
  8. オバマス検証@wiki
  9. ゆっくり虐め専用Wiki
  10. EDF4.1:地球防衛軍4.1 THE SHADOW OF NEW DESPAIR @Wiki
もっと見る
人気Wikiランキング

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

  1. アニヲタWiki(仮)
  2. ストグラ まとめ @ウィキ
  3. ゲームカタログ@Wiki ~名作からクソゲーまで~
  4. 初音ミク Wiki
  5. 発車メロディーwiki
  6. 検索してはいけない言葉 @ ウィキ
  7. 機動戦士ガンダム EXTREME VS.2 INFINITEBOOST wiki
  8. 機動戦士ガンダム バトルオペレーション2攻略Wiki 3rd Season
  9. オレカバトル アプリ版 @ ウィキ
  10. 英傑大戦wiki
もっと見る
新規Wikiランキング

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

  1. MadTown GTA (Beta) まとめウィキ
  2. まどドラ攻略wiki
  3. シュガードール情報まとめウィキ
  4. R.E.P.O. 日本語解説Wiki
  5. Dark War Survival攻略
  6. SurrounDead 攻略 (非公式wiki)
  7. カツドンチャンネル @ Wiki
  8. シミュグラ2Wiki(Simulation Of Grand2)GTARP
  9. AviUtl2のWiki
  10. Wplace Wiki
もっと見る
全体ページランキング

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

  1. 参加者一覧 - ストグラ まとめ @ウィキ
  2. サーバールール - ストグラ まとめ @ウィキ
  3. エスターク・Z・ダークネス - ストグラ まとめ @ウィキ
  4. MOZU - ストグラ まとめ @ウィキ
  5. NO LIMIT - ストグラ まとめ @ウィキ
  6. 魔獣トゲイラ - バトルロイヤルR+α ファンフィクション(二次創作など)総合wiki
  7. 我孫子 清十郎 - ストグラ まとめ @ウィキ
  8. Super Subaru - ストグラ まとめ @ウィキ
  9. 暦家 - ストグラ まとめ @ウィキ
  10. アプリコット - ストグラ まとめ @ウィキ
もっと見る

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

2019 AtWiki, Inc.