Technorati 標籤: BGP,CCIE,Router reflector,RR,路由反射器網絡
IBGP的路由反射器 (RR)session
因爲IBGP的水平分割問題,因此IBGP須要全互連FULL MESH.因爲整個IBGP full mesh的話,須要建的session數爲(n*(n-1))/2. 不具備擴展型.因此產生兩種解決辦法, RR是其中的一種.ide
總結爲非非不能傳. (非客戶和非客戶之間不能傳遞BGP路由)oop
RR的client並不知道本身是client.因此RR是本地有效. 客戶和非客戶通過RR反射的路由更新會帶上cluster-list和originator,可用於IBGP防環. Cluster-id默認爲RR本身的router-id. 能夠經過命令bgp cluster-id x.x.x.x來修改.學習
Cluster-id爲32位的值, 能夠寫成點分十進制,也能夠寫成十進制數;originator爲IBGP內起源路由器的router-id. RR是IBGP的特徵,除了IBGP後,RR全部的特性消失 (即路由攜帶的Cluster-list和originator所有消失).rest
neighbor 1.1.1.1 route-reflector-clientrouter
能夠經過這條命令來將IBGP的peer 1.1.1.1變成本身的客戶端.建議對每一個IBGP鄰居都打上這個命令.blog
當RR的客戶端FULL mesh的時候,能夠用no bgp client-to-client reflection禁止客戶端到客戶端的路由反射,能夠減小路由更新.ip
用這個命令的意義:路由
在某些特殊狀況下, 在RR上面使能了no bgp client-to-client reflection之後,客戶端到客戶端經過RR是不能進行宣告了,可是,還有一些狀況是非客戶端和客戶端之間是能夠正常通信的.
可是通常狀況下,在RR上面使能了這個命令,那麼這個RR也失效了.(由於在運營商網絡中,專用的RR會和每個路由器創建IBGP鄰居,而且指定每個路由器爲RR客戶端)
RR用兩個技術進行防止環路:Cluster-list和orgator-ID進行防環.
Cluster list:
當RR被部署的時候,cluster-id在AS內被用做另外一個環路防止機制。這個屬性記錄了在RR環境中,前綴所通過的cluster-id列表,當RR從他的客戶那裏反射路由到cluster外的非客戶的時候,或從非客戶反射路由到客戶的時候,或是從一個客戶反射到另一個客戶的時候,他會把本地cluster-id添加到clsuter-list前面。若是路由更新的cluster-list爲空,那麼RR自動建立一個.
Originator
是IBGP內起源路由器的router-ID.他在AS內部被用做防環機制,他由第一個RR建立,而且不被後續的RR所更改。Originator-id是:若是是在本地AS始發的路由,那麼就是BGP宣告者的router-id.若是路由是經過EBGP學習到的,那麼就是同一個AS的邊界路由器. 該屬性是一個32bit的數值,而且只應該從IBGP對等體那裏接收到,在RR上,originator-id用來替代路徑選擇過程當中的router ID. 當IBGP宣告者接收的更新包含他本身的originator-id時,丟棄路由。由於環路已經產生了。
在具體實施中,運營商通常是下面的狀況:
專門用兩臺核心路由器,專門作RR,路由反射器.這樣每臺路由反射器和AS內每個IBGP對等器創建鄰居關係.之因此要兩臺作RR主要目的是作冗餘,A和B兩臺路由器,只作路由反射,不作流量轉發.
簡化的狀況是下面:
從而能夠保證,無論R1學習到多少條路由,其餘全部路由器均可以同步路由信息.
路由反射器配置案例:
R2配置:
interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
interface Ethernet0/0
ip address 192.168.12.2 255.255.255.0
ip ospf 1 area 0
!
interface Serial1/0
ip address 23.1.1.2 255.255.255.0
serial restart-delay 0
!
router ospf 1
router-id 2.2.2.2
!
router bgp 12
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 2.2.2.2 mask 255.255.255.255
neighbor 1.1.1.1 remote-as 12
neighbor 1.1.1.1 update-source Loopback0
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 ebgp-multihop 10
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 advertisement-interval 20
!
ip route 3.3.3.3 255.255.255.255 23.1.1.3
!
R3配置:
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/0
ip address 38.1.1.3 255.255.255.0
!
interface Ethernet0/1
ip address 172.16.34.3 255.255.255.0
!
interface Serial1/0
ip address 23.1.1.3 255.255.255.0
serial restart-delay 0
!
router eigrp 100
network 3.3.3.3 0.0.0.0
network 172.16.34.3 0.0.0.0
eigrp router-id 3.3.3.3
!
router bgp 100
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 12
neighbor 2.2.2.2 ebgp-multihop 255
neighbor 2.2.2.2 update-source Loopback0
neighbor 4.4.4.4 remote-as 100
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 8.8.8.8 remote-as 38
neighbor 8.8.8.8 ebgp-multihop 255
neighbor 8.8.8.8 update-source Loopback0
!
ip route 2.2.2.2 255.255.255.255 23.1.1.2
ip route 8.8.8.8 255.255.255.255 38.1.1.8
!
對於R3來講,到2.2.2.2的下一跳是2.2.2.2. 由於下一跳可達2.2.2.2(靜態),因此最優.
R4配置:(路由反射器,須要和AS內全部路由器創建IBGP關係)
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Ethernet0/0
ip address 172.16.45.4 255.255.255.0
!
interface Ethernet0/1
ip address 172.16.34.4 255.255.255.0
!
router eigrp 100
network 4.4.4.4 0.0.0.0
network 172.16.34.4 0.0.0.0
network 172.16.45.4 0.0.0.0
eigrp router-id 4.4.4.4
!
router bgp 100
bgp router-id 4.4.4.4
bgp log-neighbor-changes
neighbor Hank peer-group
neighbor Hank remote-as 100
neighbor Hank update-source Loopback0
neighbor Hank route-reflector-client
neighbor 3.3.3.3 peer-group Hank
neighbor 5.5.5.5 peer-group Hank
neighbor 6.6.6.6 peer-group Hank
!
上面能夠看到,3.3.3.3,和6.6.6.6把相關的2.2.2.2和77.77.77.77路由都已經傳遞過來了。
R5配置:
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0/0
ip address 172.16.45.5 255.255.255.0
!
interface Ethernet0/1
ip address 172.16.56.5 255.255.255.0
!
router eigrp 100
network 5.5.5.5 0.0.0.0
network 172.16.45.5 0.0.0.0
network 172.16.56.5 0.0.0.0
eigrp router-id 5.5.5.5
!
router bgp 100
bgp router-id 5.5.5.5
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 100
neighbor 4.4.4.4 update-source Loopback0
!
R6配置:
interface Loopback0
ip address 6.6.6.6 255.255.255.255
!
interface Ethernet0/1
ip address 172.16.56.6 255.255.255.0
!
interface Serial1/0
ip address 67.1.1.6 255.255.255.0
serial restart-delay 0
!
router eigrp 100
network 6.6.6.6 0.0.0.0
network 172.16.56.6 0.0.0.0
eigrp router-id 6.6.6.6
!
router bgp 100
bgp router-id 6.6.6.6
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 100
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 7.7.7.7 remote-as 67
neighbor 7.7.7.7 ebgp-multihop 255
neighbor 7.7.7.7 update-source Loopback0
!
ip route 7.7.7.7 255.255.255.255 67.1.1.7
!
R7配置:
interface Loopback0
ip address 7.7.7.7 255.255.255.255
!
interface Loopback77
ip address 77.77.77.77 255.255.255.0
!
interface Serial1/0
ip address 67.1.1.7 255.255.255.0
serial restart-delay 0
!
router bgp 67
bgp router-id 7.7.7.7
bgp log-neighbor-changes
network 77.77.77.0 mask 255.255.255.0
neighbor 6.6.6.6 remote-as 100
neighbor 6.6.6.6 ebgp-multihop 10
neighbor 6.6.6.6 update-source Loopback0
!
ip route 6.6.6.6 255.255.255.255 67.1.1.6
!
最終:R2 ping R7,通: