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

DynagenでCCIEを目指す

20100621 BGP タイマーの調節

最終更新:2010年07月03日 16:36

it_certification

- view
管理者のみ編集可
  • 目的
  • 構成
  • 検証1 検証環境構築
  • 検証2 timers bgpによる設定
  • 検証3 neighbor timersによる設定
  • 検証4 最小送信間隔の確認
  • 検証5 最小送信間隔の設定
  • 検証6 bgp fast-external-fallover
  • 検証7 bgp dampening
  • 検証8 経路毎のdampening定義

目的

  • BGPのパフォーマンスチューニングを行います。

構成

  • 設定概要
    • 初期設定はip addressのみです
  • 構成図
  • netファイル
model = 3620
[localhost]
	
	[[3620]]
		image = C:\Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin
		ram = 128
	
	[[ROUTER R1]]
		f0/0 = R2 f0/0
	
	[[ROUTER R2]]
		f1/0 = R3 f1/0
	
	[[ROUTER R3]]
  • 初期設定 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.12.1 255.255.255.0
 duplex auto
 speed auto
!
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.12.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.23.2 255.255.255.0
 duplex auto
 speed auto
!
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 FastEthernet1/0
 ip address 192.168.23.3 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 neighborの設定を投入します。R1, R2間はiBGP neighborとし、R2, R3間はeBGP neighborとします。
R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 remote-as 1
R1(config-router)#network 1.1.1.1 mask 255.255.255.255

R2(config)#router bgp 1
R2(config-router)#neighbor 192.168.12.1 remote-as 1
R2(config-router)#neighbor 192.168.12.1 next-hop-self
R2(config-router)#neighbor 192.168.23.3 remote-as 3
R2(config-router)#network 2.2.2.2 mask 255.255.255.255

R3(config)#router bgp 3
R3(config-router)#neighbor 192.168.23.2 remote-as 1
R3(config-router)#network 3.3.3.3 mask 255.255.255.255
  • BGP neighborの確認
BGP neighborが確立された事を確認します。
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
3 BGP path attribute entries using 180 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 651 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.12.1    4     1       6       7        4    0    0 00:02:00        1
192.168.23.3    4     3       6       7        4    0    0 00:01:01        1
R2#

検証2 timers bgpによる設定

  • デフォルト設定の確認
デフォルトの状態でのBGP hello time, hold timeを確認します。iBGP neighborもeBGP neighborも同様に、helloが60秒, holdが180秒になっています。
R2#show ip bgp neighbors 192.168.12.1
BGP neighbor is 192.168.12.1,  remote AS 1, internal link
  BGP version 4, remote router ID 1.1.1.1
  BGP state = Established, up for 00:03:16
  Last read 00:00:16, hold time is 180, keepalive interval is 60 seconds <- hello, holdを確認
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
 - 略 -

R2#show ip bgp neighbors 192.168.23.3
BGP neighbor is 192.168.23.3,  remote AS 3, external link
  BGP version 4, remote router ID 3.3.3.3
  BGP state = Established, up for 00:02:49
  Last read 00:00:49, hold time is 180, keepalive interval is 60 seconds <- hello, holdを確認
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received

  • timer bgpによる設定
timer bgpコマンドでhello, holdを調整します。しかし、このコマンドを投入しただけでは、設定が反映されない事が確認できます。
R1(config)#router bgp 1
R1(config-router)#timers bgp 45 135

R2(config)#router bgp 1
R2(config-router)#timers bgp 50 150

R2#show ip bgp neighbors 192.168.12.1
BGP neighbor is 192.168.12.1,  remote AS 1, internal link
  BGP version 4, remote router ID 1.1.1.1
  BGP state = Established, up for 00:09:15
  Last read 00:00:14, hold time is 180, keepalive interval is 60 seconds <- 設定投入だけでは反映されません
  Configured hold time is 150, keepalive interval is 50 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  • neighborの再確立
R1, R2間のneihgborを再確立させます。neighbor確立時にhello, holdの値がネゴシエーションされ、hello, holdの値が反映されます。なお、hello, holdがneihgbor間で異なる場合は、小さい方の値が採用されます。
R1#clear ip bgp 192.168.12.2
R1#
*Mar  1 00:18:38.871: %BGP-5-ADJCHANGE: neighbor 192.168.12.2 Down User reset
*Mar  1 00:18:45.959: %BGP-5-ADJCHANGE: neighbor 192.168.12.2 Up
R1#
R1#show ip bgp neighbors 192.168.12.2
BGP neighbor is 192.168.12.2,  remote AS 1, internal link
  BGP version 4, remote router ID 2.2.2.2
  BGP state = Established, up for 00:00:27
  Last read 00:00:27, hold time is 135, keepalive interval is 45 seconds <- hello, holdの値が反映された事が分かります
  Configured hold time is 135, keepalive interval is 45 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received

  • パケットキャプチャによる確認
neighbor確立時のパケットを採取すると、確かに、hello, holdの値をネゴシエーションしている様子が読み取れます。

検証3 neighbor timersによる設定

  • neighbor timersによる設定
neighbor timersコマンドを用いると、neihgbor毎にhello, holdを設定する事ができます。なお、この設定は検証2のbgp timersよりも優先されます。
R2(config)#router bgp 1
R2(config-router)#neighbor 192.168.23.3 timers 30 90

R3(config)#router bgp 3
R3(config-router)#neighbor 192.168.23.2 timers 40 120

R2#clear ip bgp 192.168.23.3
R2#
*Mar  1 00:23:41.039: %BGP-5-ADJCHANGE: neighbor 192.168.23.3 Down User reset
*Mar  1 00:23:57.731: %BGP-5-ADJCHANGE: neighbor 192.168.23.3 Up
R2#
R2#show ip bgp neighbors 192.168.23.3
BGP neighbor is 192.168.23.3,  remote AS 3, external link
  BGP version 4, remote router ID 3.3.3.3
  BGP state = Established, up for 00:00:06
  Last read 00:00:06, hold time is 90, keepalive interval is 30 seconds
  Configured hold time is 90, keepalive interval is 30 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received

検証4 最小送信間隔の確認

  • デフォルト設定の確認
BGPでは、フラッピングの影響を緩和するために、最小送信間隔を定義しています。最小送信間隔はshow ip bgp neighborコマンドで確認可能であり、デフォルト設定の場合のiBGPは5秒、eBGPは30秒になっています。具体的には、iBGP neighborでは、BGP updateを送信した後は、少なくても5秒間はBGP updateを送信しなくなるという意味です。
R2#show ip bgp neighbors 192.168.12.1
BGP neighbor is 192.168.12.1,  remote AS 1, internal link
  BGP version 4, remote router ID 192.168.12.1
  BGP state = Established, up for 00:07:41
  Last read 00:00:16, hold time is 135, keepalive interval is 45 seconds
  Configured hold time is 150, keepalive interval is 50 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                2          3
    Keepalives:            13         13
    Route Refresh:          0          0
    Total:                 16         17
  Default minimum time between advertisement runs is 5 seconds <- 最小送信間隔は5秒

 For address family: IPv4 Unicast
  BGP table version 6, neighbor version 6
  Index 1, Offset 0, Mask 0x2

R2#
R2#
R2#show ip bgp neighbors 192.168.23.3
BGP neighbor is 192.168.23.3,  remote AS 3, external link
  BGP version 4, remote router ID 3.3.3.3
  BGP state = Established, up for 00:07:34
  Last read 00:00:04, hold time is 90, keepalive interval is 30 seconds <- 最小送信間隔は30秒
  Configured hold time is 90, keepalive interval is 30 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                4          1
    Keepalives:            18         18
    Route Refresh:          0          0
    Total:                 23         20
  Default minimum time between advertisement runs is 30 seconds

 For address family: IPv4 Unicast
  BGP table version 6, neighbor version 6
  Index 2, Offset 0, Mask 0x4

R2#

  • デバッグの有効化
R1, R2でdebug ip bgp updatesを有効にします。
R1#debug ip bgp updates
BGP updates debugging is on
R1#

R2#debug ip bgp updates
BGP updates debugging is on
R2#
  • BGP updatesの確認
R1 Lo0で素早くshut, no shutコマンドを投入します。すると、1.1.1.1への経路がなくなった旨のupdateは00:11:15に送信されているのに対し、1.1.1.1への経路が復活した旨のupdateは5秒後の00:11:20に送信されています。
R1(config)#interface Loopback 0
R1(config-if)#shutdown
R1(config-if)#no shut
R1(config-if)#
*Mar  1 00:11:15.455: BGP(0): route 1.1.1.1/32 down
*Mar  1 00:11:15.455: BGP(0): no valid path for 1.1.1.1/32
*Mar  1 00:11:15.459: BGP(0): nettable_walker 1.1.1.1/32 no best path
*Mar  1 00:11:15.463: BGP(0): 192.168.12.2 computing updates, afi 0, neighbor version 8, table version 9, starting at 0.0.0.0
*Mar  1 00:11:15.463: BGP(0): 192.168.12.2 send unreachable 1.1.1.1/32
*Mar  1 00:11:15.467: BGP(0): 192.168.12.2 send UPDATE 1.1.1.1/32 -- unreachable
*Mar  1 00:11:15.467: BGP(0): 192.168.12.2 1 updates enqueued (average=28, maximum=28)
*Mar  1 00:11:15.471: BGP(0): 192.168.12.2 update run completed, afi 0, ran for 8ms, neighbor version 8, start version 9, throttled to 9
*Mar  1 00:11:16.331: BGP(0): route 1.1.1.1/32 up
*Mar  1 00:11:16.335: BGP(0): nettable_walker 1.1.1.1/32 route sourced locally
*Mar  1 00:11:20.775: BGP(0): 192.168.12.2 computing updates, afi 0, neighbor version 9, table version 10, starting at 0.0.0.0
*Mar  1 00:11:20.779: BGP(0): 192.168.12.2 send UPDATE (format) 1.1.1.1/32, next 192.168.12.1, metric 0, path
*Mar  1 00:11:20.783: BGP(0): 192.168.12.2 1 updates enqueued (average=56, maximum=56)
*Mar  1 00:11:20.783: BGP(0): 192.168.12.2 update run completed, afi 0, ran for 8ms, neighbor version 9, start version 10, throttled to 10
R1(config-if)#

また、R2のデバッグメッセージを確認すると、最小送信間隔が30秒である事が読み取れます。1.1.1.1への経路がなくなった旨のupdateは00:03:45に送信されているのに対し、1.1.1.1への経路が復活した旨のupdateは30秒後の00:04:15に送信されています。
R2#
*Mar  1 00:03:45.855: BGP(0): 192.168.12.1 rcv UPDATE about 1.1.1.1/32 -- withdrawn
*Mar  1 00:03:45.859: BGP(0): no valid path for 1.1.1.1/32
*Mar  1 00:03:45.863: BGP(0): nettable_walker 1.1.1.1/32 no best path
*Mar  1 00:03:45.863: BGP(0): 192.168.12.1 computing updates, afi 0, neighbor version 4, table version 5, starting at 0.0.0.0
*Mar  1 00:03:45.867: BGP(0): 192.168.12.1 update run completed, afi 0, ran for 0ms, neighbor version 4, start version 5, throttled to 5
*Mar  1 00:03:45.971: BGP(0): 192.168.23.3 computing updates, afi 0, neighbor version 4, table version 5, starting at 0.0.0.0
*Mar  1 00:03:45.975: BGP(0): 192.168.23.3 send unreachable 1.1.1.1/32
*Mar  1 00:03:45.975: BGP(0): 192.168.23.3 send UPDATE 1.1.1.1/32 -- unreachable
*Mar  1 00:03:45.975: BGP(0): 192.168.23.3 1 updates enqueued (average=28, maximum=28)
*Mar  1 00:03:45.979: BGP(0): 192.168.23.3 update run completed, afi 0, ran for 8ms, neighbor version 4, start version 5, throttled to 5
*Mar  1 00:03:54.955: BGP(0): 192.168.12.1 rcvd UPDATE w/ attr: nexthop 192.168.12.1, origin i, localpref 100, metric 0
*Mar  1 00:03:54.959: BGP(0): 192.168.12.1 rcvd 1.1.1.1/32
*Mar  1 00:03:54.959: BGP(0): Revise route installing 1 of 1 route for 1.1.1.1/32 -> 192.168.12.1 to main IP table
*Mar  1 00:03:55.063: BGP(0): 192.168.12.1 computing updates, afi 0, neighbor version 5, table version 6, starting at 0.0.0.0
*Mar  1 00:03:55.067: BGP(0): 192.168.12.1 update run completed, afi 0, ran for 4ms, neighbor version 5, start version 6, throttled to 6
*Mar  1 00:04:15.115: BGP(0): 192.168.23.3 computing updates, afi 0, neighbor version 5, table version 6, starting at 0.0.0.0
*Mar  1 00:04:15.119: BGP(0): 192.168.23.3 send UPDATE (format) 1.1.1.1/32, next 192.168.23.2, metric 0, path
*Mar  1 00:04:15.123: BGP(0): 192.168.23.3 1 updates enqueued (average=46, maximum=46)
*Mar  1 00:04:15.123: BGP(0): 192.168.23.3 update run completed, afi 0, ran for 8ms, neighbor version 5, start version 6, throttled to 6
R2#

検証5 最小送信間隔の設定

  • デバッグの有効化
検証4に引き続き、R1, R2でのdebug ip bgp updatesは有効なままにしておきます。
R1#debug ip bgp updates
BGP updates debugging is on
R1#

R2#debug ip bgp updates
BGP updates debugging is on
R2#

  • 最小送信間隔の設定
neihgbor advertisement-intervalコマンドを用いて、最小送信間隔を設定します。
R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 advertisement-interval 15
R1(config-router)#^Z
R1#
*Mar  1 00:05:07.027: %SYS-5-CONFIG_I: Configured from console by console
R1#
R1#
R1#show ip bgp neighbors 192.168.12.2
BGP neighbor is 192.168.12.2,  remote AS 1, internal link
  BGP version 4, remote router ID 2.2.2.2
  BGP state = Established, up for 00:00:20
  Last read 00:00:20, hold time is 135, keepalive interval is 45 seconds
  Configured hold time is 135, keepalive interval is 45 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  2          2
    Notifications:          0          0
    Updates:                2          4
    Keepalives:            13         13
    Route Refresh:          0          0
    Total:                 17         19
  Default minimum time between advertisement runs is 5 seconds <- デフォルトの最小送信間隔

 For address family: IPv4 Unicast
  BGP table version 8, neighbor version 8
  Index 1, Offset 0, Mask 0x2
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               1          2 (Consumes 96 bytes)
    Prefixes Total:                 1          2
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          2
    Used as multipath:            n/a          0

                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Bestpath from this peer:              2        n/a
    Total:                                2          0
  Number of NLRIs in the update sent: max 1, min 0
  Minimum time between advertisement runs is 15 seconds <- 現在設定されている最小送信間隔


R2(config)#router bgp 1
R2(config-router)#neighbor 192.168.23.3 advertisement-interval 40
R2(config-router)#^Z
R2#
*Mar  1 00:05:12.747: %SYS-5-CONFIG_I: Configured from console by console
R2#
R2#
R2#show ip bgp neighbors 192.168.23.3
BGP neighbor is 192.168.23.3,  remote AS 3, external link
  BGP version 4, remote router ID 3.3.3.3
  BGP state = Established, up for 00:07:28
  Last read 00:00:27, hold time is 90, keepalive interval is 30 seconds
  Configured hold time is 90, keepalive interval is 30 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                4          1
    Keepalives:            17         17
    Route Refresh:          0          0
    Total:                 22         19
  Default minimum time between advertisement runs is 30 seconds <- デフォルトの最小送信間隔

 For address family: IPv4 Unicast
  BGP table version 6, neighbor version 6
  Index 2, Offset 0, Mask 0x4
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               2          1 (Consumes 48 bytes)
    Prefixes Total:                 3          1
    Implicit Withdraw:              0          0
    Explicit Withdraw:              1          0
    Used as bestpath:             n/a          1
    Used as multipath:            n/a          0

                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    Bestpath from this peer:              1        n/a
    Total:                                1          0
  Number of NLRIs in the update sent: max 1, min 0
  Minimum time between advertisement runs is 40 seconds <- 現在設定されている最小送信間隔
  • BGP updatesの確認
R1 Lo0で素早くshut, no shutコマンドを投入します。検証4の時に比べて、最小送信間隔が長くなっている事が分かります。
R1(config)#interface Loopback 0
R1(config-if)#shutdown
R1(config-if)#no shutdown
R1(config-if)#
R1(config-if)#
*Mar  1 00:12:30.011: BGP(0): route 1.1.1.1/32 down
*Mar  1 00:12:30.011: BGP(0): no valid path for 1.1.1.1/32
*Mar  1 00:12:30.015: BGP(0): nettable_walker 1.1.1.1/32 no best path
*Mar  1 00:12:30.019: BGP(0): 192.168.12.2 computing updates, afi 0, neighbor version 8, table version 9, starting at 0.0.0.0
*Mar  1 00:12:30.019: BGP(0): 192.168.12.2 send unreachable 1.1.1.1/32
*Mar  1 00:12:30.023: BGP(0): 192.168.12.2 send UPDATE 1.1.1.1/32 -- unreachable
*Mar  1 00:12:30.023: BGP(0): 192.168.12.2 1 updates enqueued (average=28, maximum=28)
*Mar  1 00:12:30.027: BGP(0): 192.168.12.2 update run completed, afi 0, ran for 8ms, neighbor version 8, start version 9, throttled to 9
*Mar  1 00:12:30.231: BGP(0): route 1.1.1.1/32 up
*Mar  1 00:12:30.235: BGP(0): nettable_walker 1.1.1.1/32 route sourced locally
*Mar  1 00:12:42.611: BGP(0): 192.168.12.2 computing updates, afi 0, neighbor version 9, table version 10, starting at 0.0.0.0
*Mar  1 00:12:42.615: BGP(0): 192.168.12.2 send UPDATE (format) 1.1.1.1/32, next 192.168.12.1, metric 0, path
*Mar  1 00:12:42.619: BGP(0): 192.168.12.2 1 updates enqueued (average=56, maximum=56)
*Mar  1 00:12:42.619: BGP(0): 192.168.12.2 update run completed, afi 0, ran for 8ms, neighbor version 9, start version 10, throttled to 10
*Mar  1 00:13:00.507: BGP(0): route 1.1.1.1/32 up
R1(config-if)#

R2#
*Mar  1 00:12:13.563: BGP(0): 192.168.12.1 rcv UPDATE about 1.1.1.1/32 -- withdrawn
*Mar  1 00:12:13.563: BGP(0): no valid path for 1.1.1.1/32
*Mar  1 00:12:13.567: BGP(0): nettable_walker 1.1.1.1/32 no best path
*Mar  1 00:12:13.571: BGP(0): 192.168.12.1 computing updates, afi 0, neighbor version 6, table version 7, starting at 0.0.0.0
*Mar  1 00:12:13.575: BGP(0): 192.168.12.1 update run completed, afi 0, ran for 4ms, neighbor version 6, start version 7, throttled to 7
*Mar  1 00:12:13.575: BGP(0): 192.168.23.3 computing updates, afi 0, neighbor version 6, table version 7, starting at 0.0.0.0
*Mar  1 00:12:13.579: BGP(0): 192.168.23.3 send unreachable 1.1.1.1/32
*Mar  1 00:12:13.583: BGP(0): 192.168.23.3 send UPDATE 1.1.1.1/32 -- unreachable
*Mar  1 00:12:13.583: BGP(0): 192.168.23.3 1 updates enqueued (average=28, maximum=28)
*Mar  1 00:12:13.583: BGP(0): 192.168.23.3 update run completed, afi 0, ran for 4ms, neighbor version 6, start version 7, throttled to 7
*Mar  1 00:12:26.035: BGP(0): 192.168.12.1 rcvd UPDATE w/ attr: nexthop 192.168.12.1, origin i, localpref 100, metric 0
*Mar  1 00:12:26.035: BGP(0): 192.168.12.1 rcvd 1.1.1.1/32
*Mar  1 00:12:26.039: BGP(0): Revise route installing 1 of 1 route for 1.1.1.1/32 -> 192.168.12.1 to main IP table
*Mar  1 00:12:26.143: BGP(0): 192.168.12.1 computing updates, afi 0, neighbor version 7, table version 8, starting at 0.0.0.0
*Mar  1 00:12:26.147: BGP(0): 192.168.12.1 update run completed, afi 0, ran for 4ms, neighbor version 7, start version 8, throttled to 8
*Mar  1 00:12:49.247: BGP(0): 192.168.23.3 computing updates, afi 0, neighbor version 7, table version 8, starting at 0.0.0.0
*Mar  1 00:12:49.251: BGP(0): 192.168.23.3 send UPDATE (format) 1.1.1.1/32, next 192.168.23.2, metric 0, path
*Mar  1 00:12:49.255: BGP(0): 192.168.23.3 1 updates enqueued (average=46, maximum=46)
*Mar  1 00:12:49.255: BGP(0): 192.168.23.3 update run completed, afi 0, ran for 8ms, neighbor version 7, start version 8, throttled to 8
R2#

検証6 bgp fast-external-fallover

  • デバッグの有効化
R3でdebug ip bgp eventsを有効にします。
R3#debug ip bgp events
BGP events debugging is on
R3#
  • デフォルトの挙動確認
bgp fast-external-fallover機能を使用すると、eBGP neighborで使用しているI/Fがダウンした場合、すぐにneighborも切断します。
まずは、fast-external-falloverが機能していないデフォルトの挙動を確認します。R3 f1/0をshutdownすると、00:33:08にshutdown したにも関わらず、NOTIFICATIONが送信されたのは00:34:20になっています。NOTIFICATIONが送信されるまでに1分以上もかかっています。
R3(config)#interface FastEthernet 1/0
R3(config-if)#shutdown
R3(config-if)#
*Mar  1 00:33:08.199: %LINK-5-CHANGED: Interface FastEthernet1/0, changed state to administratively down
*Mar  1 00:33:09.199: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to down
*Mar  1 00:33:16.055: BGP: Import timer expired. Walking from 1 to 1
*Mar  1 00:33:31.055: BGP: Import timer expired. Walking from 1 to 1
*Mar  1 00:33:46.055: BGP: Import timer expired. Walking from 1 to 1
*Mar  1 00:34:01.055: BGP: Performing BGP general scanning
*Mar  1 00:34:01.055: BGP(0): scanning IPv4 Unicast routing tables
*Mar  1 00:34:01.071: BGP(IPv4 Unicast): Performing BGP Nexthop scanning for general scan
*Mar  1 00:34:01.071: BGP(0): Future scanner version: 35, current scanner version: 34
*Mar  1 00:34:01.071: BGP(1): scanning IPv6 Unicast routing tables
*Mar  1 00:34:01.071: BGP(IPv6 Unicast): Performing BGP Nexthop scanning for general scan
*Mar  1 00:34:01.071: BGP(1): Future scanner version: 35, current scanner version: 34
*Mar  1 00:34:01.071: BGP(2): scanning VPNv4 Unicast routing tables
*Mar  1 00:34:01.071: BGP(VPNv4 Unicast): Performing BGP Nexthop scanning for general scan
*Mar  1 00:34:01.071: BGP(2): Future scanner version: 35, current scanner version: 34
*Mar  1 00:34:01.071: BGP(3): scanning IPv4 Multicast routing tables
*Mar  1 00:34:01.087: BGP(IPv4 Multicast): Performing BGP Nexthop scanning for general scan
*Mar  1 00:34:01.087: BGP(3): Future scanner version: 35, current scanner version: 34
*Mar  1 00:34:16.087: BGP: Import timer expired. Walking from 1 to 1
*Mar  1 00:34:20.411: BGP: 192.168.23.2 reset due to BGP Notification sent
*Mar  1 00:34:20.411: %BGP-5-ADJCHANGE: neighbor 192.168.23.2 Down BGP Notification sent <- BGP neighbor切断
*Mar  1 00:34:20.415: %BGP-3-NOTIFICATION: sent to neighbor 192.168.23.2 4/0 (hold time expired) 0 bytes <- NOTIFICATIONメッセージでneighbor断を伝えています
R3(config-if)#no shutdown

  • bgp fast-external-falloverの設定
bgp fast-external-falloverを設定します。R3 f1/0をshutdownすると、すぐにneighborも切断されている事が分かります。
R3(config)#router bgp 3
R3(config-router)#bgp fast-external-fallover
R3(config-router)#exit
R3(config)#
R3(config)#
R3(config)#interface FastEthernet 1/0
R3(config-if)#shutdown
R3(config-if)#
*Mar  1 00:32:12.519: BGP: service reset requests
*Mar  1 00:32:12.519: BGP: service reset requests
*Mar  1 00:32:12.519: BGP: service reset requests
*Mar  1 00:32:12.523: BGP: service reset requests
*Mar  1 00:32:12.523: BGP: 192.168.23.2 reset due to Interface flap
*Mar  1 00:32:12.523: %BGP-5-ADJCHANGE: neighbor 192.168.23.2 Down Interface flap <- BGP neighbor切断
*Mar  1 00:32:14.503: %LINK-5-CHANGED: Interface FastEthernet1/0, changed state to administratively down
*Mar  1 00:32:15.503: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to down
*Mar  1 00:32:15.991: BGP: Import timer expired. Walking from 1 to 1
R3(config-if)#no shutdown

検証7 bgp dampening

  • ネットワークのエミュレート
R3に172.16.0.0/24のネットワークが接続されているかのような設定を投入します。
R3(config)#interface Loopback 0
R3(config-if)#ip address 172.16.0.3 255.255.255.0 secondary
R3(config-if)#exit
R3(config)#
R3(config)#
R3(config)#router bgp 3
R3(config-router)#network 172.16.0.0 mask 255.255.255.0

  • bgp dampeningの設定
bgp dampeningとは、フラッピングの影響を緩和するための機能です。フラップした経路に対し、penalty値を定義します。penaltyはフラップを繰り返す程大きくなり、時間の経過とともに減少します。penalty値が一定を超えた経路を敢えて使用しなくする事で、不ラッピングの影響を緩和します。
bgp dampeningの設定は以下の通りです。なお、dampeningで使用するパラメタの説明は省略します。
R2(config)#router bgp 1
R2(config-router)#bgp dampening 5 600 1500 20

  • history
以下の要領で、R3 Lo0をフラッピングさせます。
R3(config)#interface Loopback 0
R3(config-if)#shutdown
R3(config-if)#no shutdown
R2のBGPテーブルを確認すると、一部の経路がh(history)として表示されています。これはフラッピングが起きた事を表しています。
R2#show ip bgp
BGP table version is 25, 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
*>i1.1.1.1/32       192.168.12.1             0    100      0 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
 h 3.3.3.3/32       192.168.23.3             0             0 3 i <- フラッピングした経路
 h 172.16.0.0/24    192.168.23.3             0             0 3 i <- フラッピングした経路
R2#
R2#
R2#show ip bgp 3.3.3.3
BGP routing table entry for 3.3.3.3/32, version 19
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
  Not advertised to any peer
  3
    192.168.23.3 from 192.168.23.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Dampinfo: penalty 890, flapped 1 times in 00:00:57  <- penalty値が確認できます。
R2#
  • damped
さらにフラッピングを繰り返すと、d(damped)と表示され、他のpeerに経路を伝えなくなります
R2#show ip bgp
BGP table version is 29, 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
*>i1.1.1.1/32       192.168.12.1             0    100      0 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
*d 3.3.3.3/32       192.168.23.3             0             0 3 i
*d 172.16.0.0/24    192.168.23.3             0             0 3 i
R2#
R2#
R2#show ip bgp 3.3.3.3
BGP routing table entry for 3.3.3.3/32, version 28
Paths: (1 available, no best path)
Flag: 0x820
  Not advertised to any peer
  3, (suppressed due to dampening)
    192.168.23.3 from 192.168.23.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, external
      Dampinfo: penalty 2078, flapped 2 times in 00:07:35, reuse in 00:09:00  <- penalty値が確認できます
R2#

検証8 経路毎のdampening定義

  • bgp dampeningの設定
以下のようにroute-mapを用いて経路毎にdampingを定義する事もできます。
R2(config)#ip prefix-list LIST_DAM seq 10 permit 172.16.0.0/24
R2(config)#
R2(config)#
R2(config)#route-map MAP_DAM permit 10
R2(config-route-map)#match ip address prefix-list LIST_DAM
R2(config-route-map)#set dampening 5 600 1500 20
R2(config-route-map)#exit
R2(config)#
R2(config)#
R2(config)#router bgp 1
R2(config-router)#no bgp dampening
R2(config-router)#bgp dampening route-map MAP_DAM
  • dampingの確認
以下の要領で、R3 Lo0を数回フラッピングさせます。
R3(config)#interface Loopback 0
R3(config-if)#shutdown
R3(config-if)#no shutdown
R2のBGPテーブルを見ると、172.16.0.0/24のみdampingの対象となっている事が分かります。
R2#show ip bgp
BGP table version is 12, 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
*>i1.1.1.1/32       192.168.12.1             0    100      0 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
*> 3.3.3.3/32       192.168.23.3             0             0 3 i
*d 172.16.0.0/24    192.168.23.3             0             0 3 i
R2#
R2#
R2#show ip bgp 3.3.3.3
BGP routing table entry for 3.3.3.3/32, version 12
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  192.168.12.1
  3
    192.168.23.3 from 192.168.23.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, external, best
R2#
R2#
R2#show ip bgp 172.16.0.0
BGP routing table entry for 172.16.0.0/24, version 11
Paths: (1 available, no best path)
  Not advertised to any peer
  3, (suppressed due to dampening)
    192.168.23.3 from 192.168.23.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, external
      Dampinfo: penalty 1605, flapped 2 times in 00:02:14, reuse in 00:07:00
R2#
「20100621 BGP タイマーの調節」をウィキ内検索
LINE
シェア
Tweet
添付ファイル
  • bgp_timer.jpg
  • topology.jpg
DynagenでCCIEを目指す
記事メニュー

メインコンテンツ

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

更新履歴

取得中です。

@Wiki

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




ここを編集
記事メニュー2
人気記事ランキング
  1. トップページ/手順書 ネットワーク系/VLC media player (Windows版) 操作手順
  2. トップページ/動作検証 ネットワーク系/20100619 BGP プレフィックス数の制限
  3. トップページ/動作検証 ネットワーク系/http server management
  4. トップページ/動作検証 ネットワーク系/INE Mock lab 02
  5. トップページ/動作検証 ネットワーク系/20100620 BGP 負荷分散
  6. トップページ/動作検証 ネットワーク系/20100503 IS-IS 経路集約
  7. トップページ/手順書 サーバ系/Apache HTTP Server バーチャルホストの設定
  8. トップページ/動作検証 ネットワーク系/INE Workbook Volume I System Management
  9. トップページ/動作検証 ネットワーク系/CBAC 基本設定
  10. トップページ/動作検証 ネットワーク系/20100320 DHCP 基本設定
もっと見る
最近更新されたページ
  • 2923日前

    トップページ
  • 4122日前

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

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

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

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

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

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

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

    メニュー
  • 4879日前

    トップページ/動作検証 ネットワーク系/INE Workbook Volume II lab 13
もっと見る
人気記事ランキング
  1. トップページ/手順書 ネットワーク系/VLC media player (Windows版) 操作手順
  2. トップページ/動作検証 ネットワーク系/20100619 BGP プレフィックス数の制限
  3. トップページ/動作検証 ネットワーク系/http server management
  4. トップページ/動作検証 ネットワーク系/INE Mock lab 02
  5. トップページ/動作検証 ネットワーク系/20100620 BGP 負荷分散
  6. トップページ/動作検証 ネットワーク系/20100503 IS-IS 経路集約
  7. トップページ/手順書 サーバ系/Apache HTTP Server バーチャルホストの設定
  8. トップページ/動作検証 ネットワーク系/INE Workbook Volume I System Management
  9. トップページ/動作検証 ネットワーク系/CBAC 基本設定
  10. トップページ/動作検証 ネットワーク系/20100320 DHCP 基本設定
もっと見る
最近更新されたページ
  • 2923日前

    トップページ
  • 4122日前

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

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

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

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

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

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

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

    メニュー
  • 4879日前

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

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

  1. R.E.P.O. 日本語解説Wiki
  2. VCR GTA3まとめウィキ
  3. ドタバタ王子くん攻略サイト
  4. Mrs. GREEN APPLE 未発表曲wiki
  5. STAR WARS ジェダイ:サバイバー攻略 @ ウィキ
  6. ありふれた職業で世界最強 リベリオンソウル @ ウィキ
  7. アサシンクリードシャドウズ@ ウィキ
  8. あめの隠れ家
  9. パズル&コンクエスト(Puzzles&Conquest)攻略Wiki
  10. ドラゴンボール Sparking! ZERO 攻略Wiki
もっと見る
人気Wikiランキング

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

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

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

  1. 参加者一覧 - ストグラ まとめ @ウィキ
  2. 魔獣トゲイラ - バトルロイヤルR+α ファンフィクション(二次創作など)総合wiki
  3. コンクラーベ - アニヲタWiki(仮)
  4. ゲルググ(GQuuuuuuX) - アニヲタWiki(仮)
  5. サーヴァント/一覧/クラス別 - Fate/Grand Order @wiki 【FGO】
  6. 「藤崎 詩織」の攻略 - ときめきメモリアル大辞典
  7. F90[MZ仕様] - 機動戦士ガンダム バトルオペレーション2攻略Wiki 3rd Season
  8. クエスト - oblivion xbox360 Wiki
  9. 攻略・1について - ときめきメモリアル大辞典
  10. ロスサントス警察 - ストグラ まとめ @ウィキ
もっと見る

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

2019 AtWiki, Inc.