最新消息:点击查看大S的省钱秘笈

CCNP实验:BGP路由黑洞之路由反射器(Router Reflector)解决

CCNP实验 Slyar 107浏览 0评论

文章作者:姜南(Slyar) 文章来源:Slyar Home (www.slyar.com) 转载请注明,谢谢合作。

【实验环境】

C3640-IK9O3S-M Version 12.4(10)

【实验目的】

采用路由反射器(Router Reflector)解决由IBGP水平分割导致的BGP路由黑洞问题

【实验拓扑】

【实验描述】

R1、R2、R4、R5跑BGP协议,R2、R3、R4跑OSPF协议。目标是使1.1.1.1<->5.5.5.5可以互相访问

IBGP邻居关系采用回环口进行建立

R1<->R2、R4<->R5之间使用直连接口建立EBGP关系

数据层面的BGP路由黑洞问题:由于R3没有跑BGP,因此R2和R4均不会将路由条目传给R3,因此R3没有1.1.1.1和5.5.5.5的路由,导致路由黑洞。如果在R3上跑BGP,与R2和R4建立IBGP关系,又会因为IBGP水平分割导致R2、R4路由学习不完整。

解决方法:利用路由反射器,将R3作为反射器(RR),其余IBGP路由器作为客户端(C),路由反射器和其客户端共同组成路由反射簇,客户端只需要与路由反射器建立邻居即可,不需要与每台IBGP路由器建立邻居。

路由反射器的规则:

1、RR从EBGP收到的路由,会反射给客户端和非客户端;

2、从客户端收到的路由,会反射给客户端、非客户端及EBGP邻居;

3、从非客户端收到的路由,只会反射给客户端和EBGP邻居,不会反射给其他非客户端。

【实验步骤】

1、R1基本配置,端口:

!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Serial0/0
ip address 12.0.0.1 255.255.255.0
clock rate 64000
!

2、R2基本配置,端口,OSPF:

!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial0/0
ip address 12.0.0.2 255.255.255.0
!
interface Serial0/1
ip address 23.0.0.1 255.255.255.0
clock rate 64000
!
router ospf 110
router-id 2.2.2.2
network 2.2.2.0 0.0.0.255 area 0
network 23.0.0.1 0.0.0.0 area 0
!

3、R3基本配置,端口,OSPF:

!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial0/0
ip address 34.0.0.1 255.255.255.0
clock rate 64000
!
interface Serial0/1
ip address 23.0.0.2 255.255.255.0
!
router ospf 110
router-id 3.3.3.3
network 3.3.3.0 0.0.0.255 area 0
network 23.0.0.2 0.0.0.0 area 0
network 34.0.0.1 0.0.0.0 area 0
!

4、R4基本配置,端口,OSPF:

!
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface Serial0/0
ip address 34.0.0.2 255.255.255.0
!
interface Serial0/1
ip address 45.0.0.1 255.255.255.0
clock rate 64000
!
router ospf 110
router-id 4.4.4.4
network 4.4.4.0 0.0.0.255 area 0
network 34.0.0.2 0.0.0.0 area 0
!

5、R5基本配置,端口:

!
interface Loopback0
ip address 5.5.5.5 255.255.255.0
!
interface Serial0/1
ip address 45.0.0.2 255.255.255.0
!

6、配置R1与R2之间的EBGP

//R1配置AS 1
router bgp 1
no synchronization
bgp router-id 1.1.1.1
network 1.1.1.0 mask 255.255.255.0
neighbor 12.0.0.2 remote-as 3
no auto-summary

//R2配置AS 3
router bgp 3
no synchronization
bgp router-id 2.2.2.2
neighbor 12.0.0.1 remote-as 1
no auto-summary

7、配置R4与R5之间的EBGP

//R4配置AS 3
router bgp 3
no synchronization
bgp router-id 4.4.4.4
neighbor 45.0.0.2 remote-as 5
no auto-summary

//R5配置AS 5
router bgp 5
no synchronization
bgp router-id 5.5.5.5
network 5.5.5.0 mask 255.255.255.0
neighbor 45.0.0.1 remote-as 3
no auto-summary

8、使用回环接口配置R2、R3、R4之间的IBGP关系

//R3配置
router bgp 3
no synchronization
bgp router-id 3.3.3.3
neighbor 2.2.2.2 remote-as 3
neighbor 2.2.2.2 update-source Loopback0
neighbor 4.4.4.4 remote-as 3
neighbor 4.4.4.4 update-source Loopback0
no auto-summary

//R2配置
router bgp 3
neighbor 3.3.3.3 remote-as 3
neighbor 3.3.3.3 update-source Loopback0
nei 3.3.3.3 next-hop-self

//R4配置
router bgp 3
neighbor 3.3.3.3 remote-as 3
neighbor 3.3.3.3 update-source Loopback0
nei 3.3.3.3 next-hop-self

9、在R3上开启路由反射器,指定客户端

router bgp 3
neighbor 2.2.2.2 route-reflector-client
neighbor 4.4.4.4 route-reflector-client

10、查看R3的路由表

R3#sh ip bgp
BGP table version is 3, local router ID is 3.3.3.3
Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.0/24       2.2.2.2                  0    100      0 1 i
*>i5.5.5.0/24       4.4.4.4                  0    100      0 5 i

11、验证R1与R5回环口连通性

R1#ping 5.5.5.5 so 1.1.1.1
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 188/325/496 ms

12、在R2上查看反射路由条目5.5.5.0/24

R2#sh ip bgp 5.5.5.0/24
BGP routing table entry for 5.5.5.0/24, version 3
Paths: (1 available, best #1, table Default-IP-Routing-Table)

4.4.4.4 (metric 129) from 3.3.3.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 4.4.4.4, Cluster list: 3.3.3.3

13、在R4上查看反射路由条目1.1.1.0/24

R4#sh ip bgp 1.1.1.0/24
BGP routing table entry for 1.1.1.0/24, version 3
Paths: (1 available, best #1, table Default-IP-Routing-Table)

2.2.2.2 (metric 129) from 3.3.3.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 2.2.2.2, Cluster list: 3.3.3.3

14、评价

路由反射器相对于邻居全互联来说,简化了配置和数量,因为IBGP邻居关系只需要在客户端与RR之间建立即可。

转载请注明:Slyar Home » CCNP实验:BGP路由黑洞之路由反射器(Router Reflector)解决

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址