BGP Lab RR & Loop (1)

Topology:

R3,R4为Route Reflector。
R2,R5为客户。
实验目的:理解RR的冗余设计。

Platform:cisco iou

Step 1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。

Step 2、load config file (basic_config.txt)

Step 3、R3和R4上的相关RR配置。
R3:
router bgp 2
 neighbor 5.5.5.5 route-reflector-client
 neighbor 2.2.2.2 route-reflector-client

R4:
router bgp 2
 neighbor 2.2.2.2 route-reflector-client
 neighbor 5.5.5.5 route-reflector-client

配置完以后

可以观察出R4收到1.1.1.1的路由来自R3,R2

当R3,R4配置在同一个簇后观察。

R3,R4:
router bgp 2
bgp cluster-id 34.34.34.34


结论:
当一个AS中包含的IBGP对等体太多时,配置全互联就比较麻烦,这时候可以起路由反射器。
将一个路由器配置成路由反射器(RR),其他的IBGP路由器当做客户,这些客户只与RR建立对等体关系,而不是与另外的每个路由器对等。(可以大大的减少配置)
反射规则:
1)如果路由是从非客户过来则反射给客户,不会给非客户。
2)如果路由是从客户过来,会反射给客户和非客户。
3)如果路由是从EBGP邻居过来,反射给客户和非客户。

为了节省开销,当在同一个区域时,两个RR中通过指定同一个cluster-id,可以节省内存存放学过来的路由条目,因为缺省情况下,一个RR就是一个cluster,这个两个RR之间相互发放路由,就多出一倍,如果将两个RR同指定为一个cluster后,就可以减少开销。


R1++++++++++++++++++++++++++++++++++++++++++++++++++++

int lo 0
ip add 1.1.1.1 255.255.255.255

int e0/0
no sh
int e0/0.12
en do 12
ip add 12.1.1.1 255.255.255.0

router bgp 1
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 network 1.1.1.1 mask 255.255.255.255
 neighbor 12.1.1.2 remote-as 2
 no auto-summary

R2++++++++++++++++++++++++++++++++++++++++++++++

int lo 0
ip add 2.2.2.2 255.255.255.255

int e0/0
no sh
int e0/0.12
en do 12
ip add 12.1.1.2 255.255.255.0

int e0/0.24
en do 24
ip add 24.1.1.2 255.255.255.0

int e0/0.23
en do 23
ip add 23.1.1.2 255.255.255.0

router ospf 100
 router-id 2.2.2.2
 log-adjacency-changes
 network 2.2.2.2 0.0.0.0 area 0
 network 23.1.1.0 0.0.0.255 area 0
 network 24.1.1.0 0.0.0.255 area 0
!
router bgp 2
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 2
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 next-hop-self
 neighbor 4.4.4.4 remote-as 2
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 4.4.4.4 next-hop-self
 neighbor 12.1.1.1 remote-as 1
 no auto-summary

R3+++++++++++++++++++++++++++++++++++++++++++++++++++++

int lo 0
ip add 3.3.3.3 255.255.255.255

int e0/0
no sh    
int e0/0.23
en do 23
ip add 23.1.1.3 255.255.255.0

int e0/0.34
en do 34
ip add 34.1.1.3 255.255.255.0

int e0/0.35
en do 35
ip add 35.1.1.3 255.255.255.0

router ospf 100
net 0.0.0.0 0.0.0.0 a 0

router bgp 2
 no synchronization
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 2
 neighbor 2.2.2.2 update-source Loopback0
 
 neighbor 2.2.2.2 next-hop-self
 neighbor 4.4.4.4 remote-as 2
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 4.4.4.4 next-hop-self
 neighbor 5.5.5.5 remote-as 2
 neighbor 5.5.5.5 update-source Loopback0
 neighbor 5.5.5.5 next-hop-self
 no auto-summary


R4++++++++++++++++++++++++++++++++++++++++++++++++++++++++

int lo 0
ip add 4.4.4.4 255.255.255.255

int e0/0
no sh    
int e0/0.34
en do 34
ip add 34.1.1.4 255.255.255.0

int e0/0.24
en do 24
ip add 24.1.1.4 255.255.255.0

int e0/0.45
en do 45
ip add 45.1.1.4 255.255.255.0

router ospf 100
net 0.0.0.0 0.0.0.0 a 0

router bgp 2
 no synchronization
 bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 2
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 next-hop-self
 neighbor 3.3.3.3 remote-as 2
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 next-hop-self
 neighbor 5.5.5.5 remote-as 2
 neighbor 5.5.5.5 update-source Loopback0
 neighbor 5.5.5.5 next-hop-self
 no auto-summary

R5++++++++++++++++++++++++++++++++++++++++++++++++++++++

int lo 0
ip add 5.5.5.5 255.255.255.255

int e0/0
no sh
int e0/0.35
en do 35
ip add 35.1.1.5 255.255.255.0

int e0/0.45
en do 45
ip add 45.1.1.5 255.255.255.0

router ospf 100
net 0.0.0.0 0.0.0.0 a 0

router bgp 2
 no synchronization
 bgp router-id 5.5.5.5
 bgp log-neighbor-changes
 network 5.5.5.5 mask 255.255.255.255
 neighbor 3.3.3.3 remote-as 2
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 next-hop-self
 neighbor 4.4.4.4 remote-as 2
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 4.4.4.4 next-hop-self
 no auto-summary

posted @ 2020-04-15 07:54  cyrusxx  阅读(141)  评论(0编辑  收藏  举报