BGP中的最優路徑問題(只是問題,本人還沒解決)

實驗內容是BGP的基本配置

實驗拓撲如下:

主要配置如下:

R1:

interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface Loopback1
 ip address 172.16.0.1 255.255.255.0
!
interface Loopback2
 ip address 172.16.1.1 255.255.255.0
!
interface Loopback3
 ip address 172.16.2.1 255.255.255.0
!
interface Loopback4
 ip address 172.16.3.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 172.16.255.1 255.255.255.252
 duplex auto
 speed auto
!
router rip
 version 2
 network 1.0.0.0
 network 172.16.0.0
 no auto-summary
!
router bgp 64512
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 network 1.1.1.0 mask 255.255.255.0
 network 172.16.0.0
 neighbor 2.2.2.2 remote-as 64512
 neighbor 2.2.2.2 update-source Loopback0
 auto-summary
!

R2:

interface Loopback0
 ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
 ip address 172.16.255.2 255.255.255.252
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 10.1.255.1 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!        
router rip
 version 2
 network 2.0.0.0
 network 172.16.0.0
!
router bgp 64512
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 network 2.2.2.0 mask 255.255.255.0
 network 10.1.255.0 mask 255.255.255.252
 network 172.16.0.0
 neighbor 1.1.1.1 remote-as 64512
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 next-hop-self
 neighbor 10.1.255.2 remote-as 64513
 auto-summary

R3:

interface Loopback0
 ip address 3.3.3.3 255.255.255.0
!
interface Loopback1
 ip address 192.168.0.1 255.255.255.0
!
interface Loopback2
 ip address 192.168.1.1 255.255.255.0
!
interface Loopback3
 ip address 192.168.2.1 255.255.255.0
!
interface Loopback4
 ip address 192.168.3.1 255.255.255.0
!
interface Serial1/0
 ip address 10.1.255.2 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 64513
 no synchronization
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 network 10.1.255.0 mask 255.255.255.252
 network 192.168.0.0
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 neighbor 10.1.255.1 remote-as 64512
 auto-summary

做到這時,問題就出現了,在R1,show ip bgp時,不是R1直連的網段,總是在最優路徑和不優路徑之間變換,一會兒優了,一會兒又不優。

試着將R1、R2上network所有的網段,本來是做了個彙總的,但問題還在,試了將彙總功能關掉或打開,但都不行,在AS64512上,我用的是RIP協議,而且它將172.16中的所有網段都彙總成一個172.16.0.0/16,我覺得是這個RIP協議的問題,但就是不知道這什麼會這樣

改成了ospf就沒問題了

最優路徑考慮的兩個方面

第一,下一跳可達,在這裏,我在R2上做了next-hop-seft,應該就沒問題了,

第二,同步,我覺得也是沒問題的,如果說在network 172.16.0.0這個命令有問題的話,那將所有的網段都network進去,問題還是在。

所以我覺得是RIP協議的問題,但就是說不出來哪的問題,不知那位高手知道的,指點指點。

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章