BGP-route flap經典案例

 

R1s2/1>s2/1R2s2/2>s2/1R3s2/2>s2/1R4s2/2>s2/2R5f0/0>f0/0R1
AS234內跑eigrp
R1#sh run | b r b
router bgp 100
 no synchronization
 bgp router-id 1.1.1.1
network 1.1.1.1 mask 255.255.255.255
 network 12.0.0.0 mask 255.255.255.0
 neighbor 12.0.0.2 remote-as 234
 neighbor 15.0.0.5 remote-as 500
 no auto-summary

 

 

 

R2#sh run | b r e
router eigrp 90
 network 2.2.2.0 0.0.0.255
 network 23.0.0.0 0.0.0.255
 no auto-summary
!
router bgp 234
 no synchronization
 bgp router-id 2.2.2.2
neighbor 3.3.3.3 remote-as 234
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 12.0.0.1 remote-as 100
 no auto-summary

 

 

 

R3#sh run | b r e
router eigrp 90
 network 3.3.3.0 0.0.0.255
 network 23.0.0.0 0.0.0.255
 network 34.0.0.0 0.0.0.255
 no auto-summary
!
router bgp 234
 no synchronization
 bgp router-id 3.3.3.3
neighbor 2.2.2.2 remote-as 234
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 4.4.4.4 remote-as 234
 neighbor 4.4.4.4 update-source Loopback0
 no auto-summary

 

R4#sh run | b r e
router eigrp 90
 network 4.4.4.0 0.0.0.255
 network 34.0.0.0 0.0.0.255
 no auto-summary
router bgp 234
 no synchronization
 bgp router-id 4.4.4.4
neighbor 3.3.3.3 remote-as 234
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 next-hop-self
 neighbor 45.0.0.5 remote-as 500
 no auto-summary

 

 

R5#sh run | b r b
router bgp 500
 no synchronization
 bgp router-id 5.5.5.5
neighbor 15.0.0.1 remote-as 100
 neighbor 45.0.0.4 remote-as 234
 no auto-summary
觀察R3上的bgp路由變化

 

   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       4.4.4.4                  0    100      0 500 100 i
* i                 12.0.0.1                 0    100      0 100 i

 

   Network          Next Hop            Metric LocPrf Weight Path
* i1.1.1.1/32       4.4.4.4                  0    100      0 500 100 i
*>i                 12.0.0.1                 0    100      0 100 i
* i12.0.0.0/24      4.4.4.4                  0    100      0 500 100 i
*>i                 12.0.0.1                 0    100      0 100 i

 

 

   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       4.4.4.4                  0    100      0 500 100 i
* i                 12.0.0.1                 0    100      0 100 i
*>i12.0.0.0/24      4.4.4.4                  0    100      0 500 100 i
* i                 12.0.0.1                 0    100      0 100 i

 

 

   Network          Next Hop            Metric LocPrf Weight Path
* i1.1.1.1/32       4.4.4.4                  0    100      0 500 100 i
*>i                 12.0.0.1                 0    100      0 100 i
* i12.0.0.0/24      4.4.4.4                  0    100      0 500 100 i
*>i                 12.0.0.1                 0    100      0 100 i
R3(config-router)#do sh ip cef 1.1.1.1
1.1.1.1/32, version 34, epoch 0
0 packets, 0 bytes
  via 12.0.0.1, 0 dependencies, recursive
    unresolved

 

 

   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       4.4.4.4                  0    100      0 500 100 i
* i                 12.0.0.1                 0    100      0 100 i
*>i12.0.0.0/24      4.4.4.4                  0    100      0 500 100 i
* i                 12.0.0.1                 0    100      0 100 i
R3(config-router)#do sh ip cef 1.1.1.1
1.1.1.1/32, version 36, epoch 0, cached adjacency to Serial2/2
0 packets, 0 bytes
  via 4.4.4.4, 0 dependencies, recursive
    next hop 34.0.0.4, Serial2/2 via 4.4.4.0/24
valid cached adjacency
注:
先宣告bgp路由1.1.1.1R1R3學到的bgp路由1.1.1.1是從R4學來的,因爲下一跳可達,R4上做了nei 3.3.3.3 nexthopself
再宣告12.0.0.0bgp路由到R1,觀察R3學到的bgp路由,bgp路由翻動,下一跳是12.0.0.1,這個路由是從5->4->3這個方向學到的,R3掃描發現12.0.0.1下一跳不可達,因爲R2上沒有做nei 3.3.3.3 nexthopselfbgp路由又翻動了,走下一跳4.4.4.4了。

 

最後還有一個問題r> 12.0.0.0/24      12.0.0.1          0             0 100 i
R2#sh ip bgp
BGP table version is 4, 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
*> 1.1.1.1/32       12.0.0.1                 0             0 100 i
r> 12.0.0.0/24      12.0.0.1                 0             0 100 i
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章