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 iBGP-route flap经典案例_flap