爲避免在AS內部的路由環路,BGP不會向內部BGP鄰居通告它從其它內部BGP對等體中獲得的路由。
上圖中,R2會通告給R3所有它從R1學來的EBGP路由條目。但是這些路由不會通告給R4,因爲R3不會在R2和R4之間傳遞IBGP路由。爲使R4得知這些路由,R2和R4之間就必須有一對IBGP連接。
這些對IBGP全互連的要求造成了對每個IBGP路由器定義鄰居語句的需求。在一個有100個路由器的AS中,這種情況要求定義100個鄰居語句。因此,這對擴展性造成了嚴重的問題。
爲克服這個問題,BGP裏定義了路由反射器的概念(RR),RR是所有內部BGP(IBGP)會話的集中路由器或焦點。與路由反射器對等的路由
器稱爲路由反射器客戶。這些客戶與路由反射器相匹配並交換路由信息。路由反射器接着交換或者“反射”這一信息給所有客戶,從而消除了對全互連環境的需要。
我們在此例中,把R3設置爲路由反射器。
//// R1 ////
int f0/0
ip ad 192.1.1.1 255.255.255.0
int lo0
ip ad 1.1.1.1
router bgp 200
no syn
neighbor 192.1.1.2 remote-as 200
network 1.0.0.0
//// R2 ////
int f0/0
ip ad 192.1.1.2 255.255.255.0
int f0/1
ip ad 193.1.1.2 255.255.255.0
router bgp 200
no syn
neighbor 192.1.1.1 remote-as 100
neighbor 193.1.1.3 remote-as 200
neighbor 193.1.1.3 next-hop-self
//// R3 ////
int f0/1
ip ad 193.1.1.3 255.255.255.0
int f0/0
ip ad 194.1.1.3 255.255.255.0
router bgp 200
no syn
neighbor 193.1.1.2 remote-as 200
neighbor 193.1.1.2 route-reflector-client
neighbor 194.1.1.4 remote-as 200
neighbor 194.1.1.4 route-reflector-client
//// R4 ////
int f0/0
ip ad 194.1.1.4 255.255.255.0
router bgp 200
no syn
neighbor 194.1.1.3 remote-as 200
驗證:
show ip bgp
show ip ro