如上拓扑:上一贴的BGP路由 黑洞试验,我们既然不能在每个AS内将所有IGBP路由 器均互联,那么我们将如何来避免存在IBGP内的路由黑洞呢?带着这个疑问,探索以下试验:
将如上拓扑按R2-R1,R1-R3的IBGP邻居关系,我们会发现R1可以学习到4.4.4.0这条路由,即使使其在R1上优化,但是R1也不会传给R3,因为一个AS内的IBGP的水平分割原则,防止环路
※同一个AS内,一个路由器接受到IBGP邻居信息,将不会传给同一个AS内的其他邻居
解决办法:
一)、路由反射器(RR)
路由反射器(RR):将其RR整体看做一个路由器来参与网络结构其身份
参与RR的路由器,只有RR本身知道谁是client,而client并不知其参与到RR
结合如上拓扑,把R1和R2当作一个整体,R1做RR,来看待其网络的身份,路由条目的学习过程将正常,
把R1和R2当作一个整体,而R2来做RR,来看待其网络的身份,路由条目的学习过程将不正常。
以下为R1、R2、R3一个AS内用RR来解决路由黑洞的配置:
R4(config)#router b 400
R4(config-router )#b router-id 4.4.4.4
R4(config-router)#no au
R4(config-router)#no sy
R4(config-router)#nei 192.1.24.2 remot
R4(config-router)#nei 192.1.24.2 remote-as 123
R4(config-router)#net 4.4.4.0 mas 255.255.255.0
R2(config)#router b 123
R2(config-router)#b ro 2.2.2.2
R2(config-router)#no au
R2(config-router)#no sy
R2(config-router)#nei 192.1.24.4 remot 400
R2(config-router)#nei 1.1.1.1 remot 123
R2(config-router)#nei 1.1.1.1 up lo 0
R2(config-router)#nei 1.1.1.1 next-hop-self
R1(config)#router b 123
R1(config-router)#b router-id 1.1.1.1
R1(config-router)#no au
R1(config-router)#no sy
R1(config-router)#nei 2.2.2.2 remot 123
R1(config-router)#nei 2.2.2.2 up loo 0
R1(config-router)#nei 3.3.3.3 remot 123
R1(config-router)#nei 3.3.3.3 up lo 0
R3(config)#router b 123
R3(config-router)#b ro 3.3.3.3
R3(config-router)#nei 1.1.1.1 remot 123
R3(config-router)#nei 1.1.1.1 up lo 0
R3(config-router)#nei 192.1.35.5 remot 500
R3(config-router)#nei 1.1.1.1 next-hop-self
R5(con