RR向自己的客户端与非客户端反射路由更新的时候,有两个地方需要注意:

1.       只反射最佳路由

2.       对于自身始发的路由,不携带RRoriginatorcluster list属性

3.       不往某条最佳路由的下一跳路由器更新该最佳路由

4.       不会将在非客户端与非客户端之间反射路由更新(这里指ibgp对等体之间)

本试验讨论第三条原则。

当客户端是RR的对等体成员时,那么RR会打破这条规则。

拓扑:

 

BGP进阶学习之RR与peer-group_第1张图片

R1,R2,R3在同一个AS中,R1作为RRR2,R3作为clientR2,R3没有建立对等体关系。

基本配置显示:

 

R1

R1#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            unassigned      YES manual up                    up     

FastEthernet0/0.12         12.1.1.1        YES manual up                    up     

FastEthernet0/0.13         13.1.1.1        YES manual up                    up     

FastEthernet0/0.14         14.1.1.1        YES manual up                    up      

Loopback0                  10.1.1.1        YES manual up                    up     

….(OMIT)

 

R1#sh run | b router    

router bgp 1

 no synchronization

 bgp router-id 1.1.1.1

 bgp log-neighbor-changes

 network 10.1.1.0 mask 255.255.255.0

neighbor 12.1.1.2 remote-as 1

nei 12.1.1.2 route-reflector-client

 neighbor 13.1.1.3 remote-as 1

nei 13.1.1.3 route-reflector-client

 no auto-summary

 

R2

R2#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            unassigned      YES manual up                    up     

FastEthernet0/0.12         12.1.1.2        YES manual up                    up     

FastEthernet0/0.23         23.1.1.2        YES manual up                    up     

FastEthernet0/0.24         24.1.1.2        YES manual up                    up       

Loopback0                  20.1.1.1        YES manual up                    up     

。。。。。(OMIT

 

R2#sh run | b router

router bgp 1

 no synchronization

 bgp router-id 2.2.2.2

 bgp log-neighbor-changes

 network 20.1.1.0 mask 255.255.255.0

 neighbor 12.1.1.1 remote-as 1

 no auto-summary

 

R3

R3#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            unassigned      YES manual up                    up     

FastEthernet0/0.13         13.1.1.3        YES manual up                    up     

FastEthernet0/0.23         23.1.1.3        YES manual up                    up     

Loopback0                  30.1.1.1        YES manual up                    up     

….(OMIT)

 

R3#sh run | b router

router bgp 1

 no synchronization

 bgp router-id 3.3.3.3

 bgp log-neighbor-changes

 network 30.1.1.0 mask 255.255.255.0

 neighbor 13.1.1.1 remote-as 1

 no auto-summary

 

1

首先看看R1R2更新了哪些路由条目

R1#sh ip b nei 12.1.1.2 advertised-routes

BGP table version is 9, local router ID is 1.1.1.1

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

*> 10.1.1.0/24      0.0.0.0                  0         32768 i

*>i30.1.1.0/24      13.1.1.3                 0    100      0 i

如上所示,并没有更新20.1.1.0/24这个前缀。

 

2

下面配置R2,R3R1的对等体组成员

neighbor 23 peer-group

 neighbor 23 remote-as 1

 neighbor 23 route-reflector-client

 neighbor 12.1.1.2 peer-group 23

 neighbor 13.1.1.3 peer-group 23

 no auto-summary

 

3

再来看看更新的路由条目

R1#sh ip b nei 12.1.1.2 advertised-routes

BGP table version is 12, local router ID is 1.1.1.1

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

*> 10.1.1.0/24      0.0.0.0                  0         32768 i

*>i20.1.1.0/24      12.1.1.2                 0    100      0 i

*>i30.1.1.0/24      13.1.1.3                 0    100      0 i

R1#